Time units

Userspace exposed time units

mx_time_t is in nanoseconds.

Use mx_time_get() to get the current time.

Kernel-internal time units

lk_time_t is in nanoseconds.

To get the current time since boot, use:

#include <platform.h>

lk_time_t current_time(void);