X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=blobdiff_plain;f=adaptors%2Fcommon%2Fevent-loop%2Fecore%2Fecore-timer-impl.cpp;h=a05b13f789d1bc27835f62165f52abba5e2317e6;hp=d392001775f7529ca08330eb065b4b166fa57a0e;hb=d9134c53d393797adbbe79984d7a4b3327b07538;hpb=fba793359b957dc0a9c31e0e72b13c859b91bc21 diff --git a/adaptors/common/event-loop/ecore/ecore-timer-impl.cpp b/adaptors/common/event-loop/ecore/ecore-timer-impl.cpp index d392001..a05b13f 100644 --- a/adaptors/common/event-loop/ecore/ecore-timer-impl.cpp +++ b/adaptors/common/event-loop/ecore/ecore-timer-impl.cpp @@ -79,9 +79,7 @@ Timer::Timer( unsigned int milliSec ) Timer::~Timer() { - // stop timers - Stop(); - + ResetTimerData(); delete mImpl; } @@ -102,11 +100,7 @@ void Timer::Stop() // Timer should be used in the event thread DALI_ASSERT_DEBUG( Adaptor::IsAvailable() ); - if (mImpl->mId != NULL) - { - ecore_timer_del(mImpl->mId); - mImpl->mId = NULL; - } + ResetTimerData(); } void Timer::SetInterval( unsigned int interval ) @@ -159,6 +153,15 @@ Dali::Timer::TimerSignalType& Timer::TickSignal() return mTickSignal; } +void Timer::ResetTimerData() +{ + if (mImpl->mId != NULL) + { + ecore_timer_del(mImpl->mId); + mImpl->mId = NULL; + } +} + bool Timer::IsRunning() const { return mImpl->mId != NULL;