sta-core/include/sta/time.hpp

44 lines
783 B
C++

/**
* @file
* @brief Signatures for time related functions.
*/
#ifndef STA_CORE_TIME_HPP
#define STA_CORE_TIME_HPP
#include <cstdint>
namespace sta
{
/**
* @brief Signature for millisecond precision time.
*
* @return Time in milliseconds
*/
using TimeMsFn = uint32_t (*)();
/**
* @brief Signature for microseconds precision time.
*
* @return Time in microseconds
*/
using TimeUsFn = uint32_t (*)();
/**
* @brief Gets the current time in milliseconds.
*
* @return Time in milliseconds
*/
uint32_t timeMs();
/**
* @brief Gets the current time in microseconds.
*
* @return Time in microseconds
*/
uint32_t timeUs();
} // namespace sta
#endif // STA_CORE_TIME_HPP