# Time units

## Userspace exposed time units

*zx_time_t* is in nanoseconds.

Use [`zx_clock_get_monotonic()`](https://fuchsia.dev/reference/syscalls/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 that will run in the kernel, to read the current monotonic clock value, use:

    #include <platform.h>

    lk_time_t current_time(void);

[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/development/kernel/time.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/development/kernel/time.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/development/kernel/time.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/development/kernel/time.md "Edit the source code of this page")