• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ running函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: start

void PID::start(Callback *c, unsigned r, const ControlParams *p, Thread::Priority prio)
{
  if (!c) return;
  if (running()) stop();
  if (r) setRate(r);
  if (p) setControlParams(*p);
  mut.lock();
  cb = c;
  pleaseStop = false;
  mut.unlock();
  Thread::start(prio);
}
开发者ID:ruby6117,项目名称:ccode,代码行数:12,代码来源:PID.cpp


示例17: C_ASSERT_RETURN

truefalse CRunner::post_dist_task(CMB * mb)
{
  C_ASSERT_RETURN(mb, "\n", C_BAD);

  if (unlikely(!running()))
  {
    mb->release();
    return C_BAD;
  }

  return c_tools_mb_putq(m_ping_container->task(), mb, "post dist task");
}
开发者ID:irengine,项目名称:people,代码行数:12,代码来源:sapp.cpp


示例18: findt

TBool CAiwPrintingProvider::IsImagePrintUiRunning()
    {
    TFindThread findt(KImagePrintUiSearchPatternBySID);
    TFullName result;
    TBool running(EFalse);
    if (!findt.Next(result))
        {
        FTRACE(FPrint(_L("[CAiwPrintingProvider] Thread '%S'is found"), &result));
        running = ETrue;
        }
     return running;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:12,代码来源:caiwprintingprovider.cpp


示例19: elapsed

void RandomPlot::stop()
{
    Q_EMIT elapsed( d_timeStamp.elapsed() );

    if ( d_timer )
    {
        d_timer->stop();
        Q_EMIT running(false);
    }

    canvas()->setPaintAttribute(QwtPlotCanvas::BackingStore, true);
}
开发者ID:albore,项目名称:pandora,代码行数:12,代码来源:randomplot.cpp


示例20: qWarning

void SatelliteModel::setSingleRequest(bool single)
{
    if (running()) {
        qWarning() << "Cannot change single request mode while running";
        return;
    }

    if (single != isSingle) { //flag changed
        isSingle = single;
        emit singleRequestChanged();
    }
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:12,代码来源:satellitemodel.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ runstate_is_running函数代码示例发布时间:2022-05-30
下一篇:
C++ runner函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap