mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-03 07:50:38 +01:00
glib-aux: add nm_utils_get_monotonic_timestamp_sec_cached() helper
(cherry picked from commit3f4586532f) (cherry picked from commit66237888e7)
This commit is contained in:
parent
b74d4c1612
commit
754942038f
1 changed files with 6 additions and 0 deletions
|
|
@ -41,6 +41,12 @@ nm_utils_get_monotonic_timestamp_msec_cached(gint64 *cache_now)
|
|||
return (*cache_now) ?: (*cache_now = nm_utils_get_monotonic_timestamp_msec());
|
||||
}
|
||||
|
||||
static inline gint32
|
||||
nm_utils_get_monotonic_timestamp_sec_cached(gint32 *cache_now)
|
||||
{
|
||||
return (*cache_now) ?: (*cache_now = nm_utils_get_monotonic_timestamp_sec());
|
||||
}
|
||||
|
||||
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