当前位置: 首页>>代码示例>>C++>>正文


C++ running函数代码示例

本文整理汇总了C++中running函数的典型用法代码示例。如果您正苦于以下问题:C++ running函数的具体用法?C++ running怎么用?C++ running使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了running函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Q_UNUSED

void Function::preRun(MasterTimer* timer)
{
    Q_UNUSED(timer);

    qDebug() << "Function preRun. ID: " << m_id;
    m_stop = false;
    m_running = true;

    emit running(m_id);
}
开发者ID:basileus,项目名称:qlcplus,代码行数:10,代码来源:function.cpp

示例2: CThreadAnimation

/*
 * External constructor
 */
CThreadAnimation *CThreadAnimation::create(const STRING file, const int x, const int y, const int width, const int height, const bool bPersist)
{
	if (!file.empty() && !running(file, x, y))
	{
		CThreadAnimation *p = new CThreadAnimation(file, x, y, bPersist);
		p->m_pAnm->resize(width, height);
		m_threads.insert(p);
		return p;
	}
}
开发者ID:shao113,项目名称:trans3,代码行数:13,代码来源:CAnimation.cpp

示例3: connect

void KWin::Script::run()
{
    if (running() || m_starting) {
        return;
    }
    m_starting = true;
    QFutureWatcher<QByteArray> *watcher = new QFutureWatcher<QByteArray>(this);
    connect(watcher, SIGNAL(finished()), SLOT(slotScriptLoadedFromFile()));
    watcher->setFuture(QtConcurrent::run(this, &KWin::Script::loadScriptFromFile));
}
开发者ID:walac,项目名称:kde-workspace,代码行数:10,代码来源:scripting.cpp

示例4: running

	bool ProcessInterfaceTemplate::stopping()
	{
		string answer;
		OMethodStringStream running("stopping");

		answer= sendMethod(m_sSendTo, running, true);
		if(answer == "true")
			return true;
		return false;
	}
开发者ID:kollia,项目名称:ppi-server,代码行数:10,代码来源:ProcessInterfaceTemplate.cpp

示例5: BOOST_ASSERT

void PerformanceTimer::stop()   
{
   BOOST_ASSERT(running());
   
   // if there is an existing step pending then record its duration
   recordPendingStep();
   
   // reset start time
   startTime_ = ptime(not_a_date_time);
}
开发者ID:Brackets,项目名称:rstudio,代码行数:10,代码来源:PerformanceTimer.cpp

示例6: stop

void ScanStatus::
stop()
{
	status = 1;
	if( running() ) {
		if( gui ) gui->set_done(1);
		cancel();
		join();
	}
}
开发者ID:TravisKraatz,项目名称:cinelerra,代码行数:10,代码来源:commercials.C

示例7: CUDA_CHECK

void Timer::Stop() {
  if (running()) {
    if (Caffe::mode() == Caffe::GPU) {
      CUDA_CHECK(cudaEventRecord(stop_gpu_, 0));
      CUDA_CHECK(cudaEventSynchronize(stop_gpu_));
    } else {
      stop_cpu_ = boost::posix_time::microsec_clock::local_time();
    }
    running_ = false;
  }
}
开发者ID:JesseLivezey,项目名称:caffe,代码行数:11,代码来源:benchmark.cpp

示例8: run

void Clock::run() {
    for (;;) {
        if (running()) {
            std::this_thread::sleep_for(period);
            clk.get()->notify_all();
        }
        else {
            break;
        }
    }
}
开发者ID:TobiasRohner,项目名称:NES-Emulator,代码行数:11,代码来源:clock.cpp

示例9: running

//--------------------------------------------------------------
void Tween::reset(int a_millis) {
	if (!_isComplete) {
		*_propAdd = _begin;
		
		_startTime = a_millis;
		_time = 0.f;
		
		_isComplete = false;
	}
	cout << "Tween :: reset : running: " << running() << " complete: " << complete() << endl;
}
开发者ID:Aharobot,项目名称:ofxTweenzor,代码行数:12,代码来源:Tween.cpp

示例10:

ColorThread::~ColorThread()
{
	if(running())
	{
		window->set_done(0);
		completion->lock("ColorThread::~ColorThread");
		completion->unlock();
	}
	delete mutex;
	delete completion;
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:11,代码来源:colorpicker.C

示例11: start

void CompassCalibrator::start(bool retry, float delay, uint16_t offset_max) {
    if(running()) {
        return;
    }
    _offset_max = offset_max;
    _attempt = 1;
    _retry = retry;
    _delay_start_sec = delay;
    _start_time_ms = AP_HAL::millis();
    set_status(COMPASS_CAL_WAITING_TO_START);
}
开发者ID:BrendanSmith,项目名称:ardupilot,代码行数:11,代码来源:CompassCalibrator.cpp

示例12: PyEval_InitThreads

    void singlethreaded::execute_async(unsigned niter) 
    {
      PyEval_InitThreads();
      assert(PyEval_ThreadsInitialized());

      boost::mutex::scoped_lock l(iface_mtx);
      // compute_stack(); //FIXME hack for python based tendrils.
      scoped_ptr<thread> tmp(new thread(bind(&singlethreaded::execute_impl, this, niter)));
      tmp->swap(runthread);
      while(!running()) usleep(5); //TODO FIXME condition variable?
    }
开发者ID:oostendo,项目名称:ecto,代码行数:11,代码来源:singlethreaded.cpp

示例13: LOG

float CPUTimer::MicroSeconds() {
  if (!has_run_at_least_once()) {
    LOG(WARNING) << "Timer has never been run before reading time.";
    return 0;
  }
  if (running()) {
    Stop();
  }
  this->elapsed_microseconds_ = (this->stop_cpu_ -
                                this->start_cpu_).total_microseconds();
  return this->elapsed_microseconds_;
}
开发者ID:0hm,项目名称:caffe,代码行数:12,代码来源:benchmark.cpp

示例14: stop

edthreaded_fd::~edthreaded_fd()
{
	if (running())
		stop();
	pthread_join(m_thread, nullptr);
	pthread_mutex_destroy(&m_send_lock);
	pthread_mutex_destroy(&m_recv_lock);
	pthread_mutex_destroy(&m_error_lock);
	pthread_mutex_destroy(&m_running_lock);
	delete m_wait_timer;
	close(m_fd);
}
开发者ID:dprandle,项目名称:ctrlmod,代码行数:12,代码来源:edthreaded_fd.cpp

示例15: set_fd

bool edthreaded_fd::set_fd(int32_t fd_)
{
	if (running())
	{
		_setError(AlreadyRunning, 0);
		return false;
	}
	if (m_fd != -1)
		close(m_fd);
	m_fd = fd_;
	return true;
}
开发者ID:dprandle,项目名称:ctrlmod,代码行数:12,代码来源:edthreaded_fd.cpp


注:本文中的running函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。