Dali::Timer TickSignal function

159 Views Asked by At

I want use timer in tizen application where I will get the signal every 10 seconds. I did some digging and find out that there is function Dali::Timer::TickSignal() but i am getting confuse on how to use that function? Can anyone help with brief example?

2

There are 2 best solutions below

0
On BEST ANSWER

It's really simple you can just add the callback function of your controller like:

static Timer timer = Dali::Timer::New(10000);
timer.Start();
timer.TickSignal().Connect(this, &YourController::callbackFunction);

and callback function like:

bool callbackFunction(){

    return true;
}
1
On

From the page:

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

You can also make a request in github.com to get samples: https://github.com/search?q=TickSignal+tizen&type=Code&utf8=%E2%9C%93