MULE
0.0.1
Multi-Use Library Essentials
Toggle main menu visibility
Loading...
Searching...
No Matches
time.h
1
#pragma once
2
/**
3
* @defgroup mod_time Time
4
* @brief A monotonic clock for measuring how long things take.
5
*
6
* time_now_ns() reads `CLOCK_MONOTONIC`. It never goes backwards, so the
7
* difference between two readings is a duration even when the wall clock
8
* changes. It does not tell the time of day.
9
*
10
* @snippet{trimleft} test_time.c time
11
* @{
12
*/
13
14
#include "base/base.h"
15
16
/** Nanoseconds on a monotonic clock. It never goes backwards, but its zero is
17
* arbitrary, so only the difference between two readings means anything. */
18
MULE_NODISCARD uint64_t
time_now_ns
(
void
);
19
20
/** @} */
time_now_ns
uint64_t time_now_ns(void)
Nanoseconds on a monotonic clock.
Definition
time.c:5
src
time
time.h
Generated by
1.18.0