[Tizen] Add SetInterval, Pause, and Resume APIs in Timer
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / timer.cpp
index 85642f2..ba98792 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // CLASS HEADER
 #include <dali/public-api/adaptor-framework/timer.h>
 
-// EXTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-
 // INTERNAL INCLUDES
+#include <dali/public-api/dali-adaptor-common.h>
 #include <dali/internal/system/common/timer-impl.h>
 
 namespace Dali
@@ -71,9 +69,24 @@ void Timer::Stop()
   Internal::Adaptor::GetImplementation(*this).Stop();
 }
 
+void Timer::Pause()
+{
+  Internal::Adaptor::GetImplementation(*this).Pause();
+}
+
+void Timer::Resume()
+{
+  Internal::Adaptor::GetImplementation(*this).Resume();
+}
+
 void Timer::SetInterval( unsigned int interval )
 {
-  Internal::Adaptor::GetImplementation(*this).SetInterval( interval );
+  Internal::Adaptor::GetImplementation(*this).SetInterval( interval, true );
+}
+
+void Timer::SetInterval( unsigned int interval, bool restart )
+{
+  Internal::Adaptor::GetImplementation(*this).SetInterval( interval, restart );
 }
 
 unsigned int Timer::GetInterval() const