mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-10 00:36:00 +00:00
41 lines
788 B
C++
41 lines
788 B
C++
/**
|
|
* @file
|
|
* @brief Timer interface definition.
|
|
*/
|
|
#ifndef STA_CORE_TIMER_HPP
|
|
#define STA_CORE_TIMER_HPP
|
|
|
|
|
|
namespace sta
|
|
{
|
|
/**
|
|
* @brief Interface for timer objects.
|
|
*
|
|
* @ingroup sta_core
|
|
*/
|
|
class Timer
|
|
{
|
|
public:
|
|
/**
|
|
* @brief Start Timer.
|
|
*
|
|
* @param millis Timer duration in milliseconds
|
|
*/
|
|
virtual void start(uint32_t millis) = 0;
|
|
/**
|
|
* @brief Stop Timer.
|
|
*
|
|
*/
|
|
virtual void stop() = 0;
|
|
/**
|
|
* @brief Check if timer is running.
|
|
*
|
|
* @return true if timer is running
|
|
* @return false if timer is not running
|
|
*/
|
|
virtual bool isRunning() = 0;
|
|
};
|
|
} // namespace sta
|
|
|
|
|
|
#endif //STA_CORE_TIMER_HPP
|