mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-06 07:00:27 +01:00
shared: add nm_utils_get_monotonic_timestamp_msec_cached() helper
This commit is contained in:
parent
8b63b229dd
commit
9153e7912f
1 changed files with 7 additions and 0 deletions
|
|
@ -37,6 +37,13 @@ nm_utils_get_monotonic_timestamp_nsec_cached (gint64 *cache_now)
|
|||
?: (*cache_now = nm_utils_get_monotonic_timestamp_nsec ());
|
||||
}
|
||||
|
||||
static inline gint64
|
||||
nm_utils_get_monotonic_timestamp_msec_cached (gint64 *cache_now)
|
||||
{
|
||||
return (*cache_now)
|
||||
?: (*cache_now = nm_utils_get_monotonic_timestamp_msec ());
|
||||
}
|
||||
|
||||
gint64 nm_utils_clock_gettime_nsec (clockid_t clockid);
|
||||
gint64 nm_utils_clock_gettime_msec (clockid_t clockid);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue