+#include <dali/public-api/signals/dali-signal.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+class Timer;
+
+typedef IntrusivePtr<Timer> TimerPtr;
+
+Dali::Timer::TimerSignalType gTickSignal;
+int gTimerCount = 0;
+bool gKeepTimersRunning = false;
+
+/**
+ * Implementation of the timer
+ */
+class Timer : public BaseObject
+{
+public:
+ void MockEmitSignal();
+
+public:
+ static TimerPtr New( unsigned int milliSec );
+ Timer( unsigned int milliSec );
+ virtual ~Timer();
+
+ void Start();
+ void Stop();
+ void SetInterval( unsigned int interval );
+ unsigned int GetInterval() const;
+ bool IsRunning() const;
+ bool Tick();
+
+public: // Signals
+
+ Dali::Timer::TimerSignalType& TickSignal();
+
+private: // Implementation
+
+ // not implemented
+ Timer( const Timer& );
+ Timer& operator=( const Timer& );
+
+private: // Data
+
+ unsigned int mInterval;
+ bool mRunning;
+};
+
+inline Timer& GetImplementation(Dali::Timer& timer)
+{
+ DALI_ASSERT_ALWAYS(timer && "Timer handle is empty");
+
+ BaseObject& handle = timer.GetBaseObject();
+
+ return static_cast<Internal::Adaptor::Timer&>(handle);
+}
+
+inline const Timer& GetImplementation(const Dali::Timer& timer)
+{
+ DALI_ASSERT_ALWAYS(timer && "Timer handle is empty");
+
+ const BaseObject& handle = timer.GetBaseObject();
+
+ return static_cast<const Internal::Adaptor::Timer&>(handle);
+}
+
+TimerPtr Timer::New( unsigned int milliSec )
+{
+ TimerPtr timerImpl = new Timer( milliSec );
+ return timerImpl;
+}
+
+Timer::Timer( unsigned int milliSec )
+: mInterval( milliSec ),
+ mRunning( false )
+{
+ ++gTimerCount;
+}
+
+Timer::~Timer()
+{
+ --gTimerCount;
+}
+
+void Timer::Start()
+{
+ mRunning = true;
+}
+
+void Timer::Stop()
+{
+ mRunning = false;
+}
+
+void Timer::SetInterval( unsigned int interval )
+{
+ mInterval = interval;
+}
+
+unsigned int Timer::GetInterval() const
+{
+ return mInterval;
+}
+
+bool Timer::IsRunning() const
+{
+ return mRunning;
+}
+
+bool Timer::Tick()
+{
+ return false;
+}
+
+Dali::Timer::TimerSignalType& Timer::TickSignal()
+{
+ return gTickSignal;
+}
+
+// Mock setup functions:
+
+void Timer::MockEmitSignal()
+{
+ if( gTimerCount > 1 )
+ {
+ // Only emit the signal if we have more than just the timer created in the test function
+ gTickSignal.Emit();
+ }
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+/********************************************************************************/
+/********************************* PUBLIC CLASS *******************************/
+/********************************************************************************/
+
+Timer::Timer()
+{
+
+}
+
+Timer Timer::New( unsigned int milliSec )
+{
+ Internal::Adaptor::TimerPtr internal = Internal::Adaptor::Timer::New( milliSec );
+ return Timer(internal.Get());
+}
+
+Timer::Timer( const Timer& timer )
+:BaseHandle( timer )
+{
+}