Make clock.c atomic
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
struct clock {
|
||||
const char* name;
|
||||
uint8_t priority;
|
||||
uint64_t base;
|
||||
|
||||
void (*reset)(struct clock* c);
|
||||
uint64_t (*get_elapsed_ns)(struct clock* c);
|
||||
@@ -19,5 +20,9 @@ bool clock_available();
|
||||
// Gets the current timestamp in nanoseconds since the last reset.
|
||||
uint64_t clock_get_elapsed_ns();
|
||||
|
||||
uint64_t clock_get_realtime_ns();
|
||||
|
||||
void clock_set_realtime_ns(uint64_t ns);
|
||||
|
||||
// Spin for `ns` nanoseconds.
|
||||
void clock_spin_ns(uint64_t ns);
|
||||
|
||||
Reference in New Issue
Block a user