blob: 0580b94f09e4fbd1fe30dbb96528851ee9b4c932 [file] [log] [blame] [view]
# Time units
## Userspace exposed time units
*zx\_time\_t* is in nanoseconds.
Use [`zx_clock_get_monotonic()`] to get the current time as the number of nanoseconds since boot.
## Kernel-internal time units
*lk\_time\_t* is in nanoseconds.
When writing code which will run in the kernel, to read the current monotonic clock value, use:
```
#include <platform.h>
lk_time_t current_time(void);
```
[`zx_clock_get_monotonic()`]: /docs/reference/syscalls/clock_get_monotonic.md