我想在 tizen 应用程序中使用计时器,我将每 10 秒收到一次信号。我做了一些挖掘,发现有函数 Dali::Timer::TickSignal() 但我对如何使用该函数感到困惑?谁能帮忙举个简单的例子?
问问题
140 次
2 回答
1
这真的很简单,您只需添加控制器的回调函数,例如:
static Timer timer = Dali::Timer::New(10000);
timer.Start();
timer.TickSignal().Connect(this, &YourController::callbackFunction);
and callback function like:
bool callbackFunction(){
return true;
}
于 2018-01-18T10:13:15.567 回答
0
从页面:
TimerSignalType& Dali::Timer::TickSignal ( )
Signal emitted after specified time interval.
The return of the callback decides whether signal emission
stops or continues. If the callback function returns false, emission will
stop and if true, it will continue. This return value is ignored for
one-shot events, which will always stop after the first execution.
Returns:
The signal to Connect() with
Since:
2.4, DALi version 1.0.0
您也可以在 github.com 中请求获取样本:https ://github.com/search?q=TickSignal+tizen&type=Code&utf8=%E2%9C%93
于 2018-01-18T00:46:31.633 回答