/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
return Timer(internal.Get());
}
-Timer::Timer( const Timer& timer )
-: BaseHandle(timer)
-{
-}
+Timer::Timer( const Timer& copy ) = default;
-Timer& Timer::operator=( const Timer& timer )
-{
- // check self assignment
- if( *this != timer )
- {
- BaseHandle::operator=(timer);
- }
- return *this;
-}
+Timer& Timer::operator=( const Timer& rhs ) = default;
+
+Timer::Timer( Timer&& rhs ) = default;
+
+Timer& Timer::operator=( Timer&& rhs ) = default;
Timer::~Timer()
{
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