mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpiutil] Add GetSystemTime() (#3840)
This portably gets the time in microseconds since the Unix epoch.
This commit is contained in:
@@ -33,6 +33,14 @@ void WPI_SetNowImpl(uint64_t (*func)(void));
|
||||
*/
|
||||
uint64_t WPI_Now(void);
|
||||
|
||||
/**
|
||||
* Return the current system time in microseconds since the Unix epoch
|
||||
* (January 1st, 1970 00:00 UTC).
|
||||
*
|
||||
* @return Time in microseconds.
|
||||
*/
|
||||
uint64_t WPI_GetSystemTime(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
@@ -62,6 +70,14 @@ void SetNowImpl(uint64_t (*func)());
|
||||
*/
|
||||
uint64_t Now(void);
|
||||
|
||||
/**
|
||||
* Return the current system time in microseconds since the Unix epoch
|
||||
* (January 1st, 1970 00:00 UTC).
|
||||
*
|
||||
* @return Time in microseconds.
|
||||
*/
|
||||
uint64_t GetSystemTime();
|
||||
|
||||
} // namespace wpi
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user