33 lines
525 B
C
33 lines
525 B
C
#pragma once
|
|
|
|
#if __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "std.h"
|
|
|
|
/// nanoseconds
|
|
typedef u64 nsec_t;
|
|
/// microseconds
|
|
typedef u64 usec_t;
|
|
/// miliseconds
|
|
typedef u64 msec_t;
|
|
/// seconds
|
|
typedef u64 sec_t;
|
|
|
|
/// system time now in nanoseconds
|
|
///@return u64 will overflow in 13 years
|
|
nsec_t getTimeNsec();
|
|
|
|
/// system time now in microseconds
|
|
///@return u64 will overflow in 58494 years
|
|
usec_t getTimeUsec();
|
|
|
|
void sleepNsec(nsec_t time);
|
|
void sleepUsec(usec_t time);
|
|
void sleepMsec(msec_t time);
|
|
|
|
#if __cplusplus
|
|
}
|
|
#endif
|