diff options
author | Thomas Haller <thaller@redhat.com> | 2016-03-11 14:40:58 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-03-17 15:00:48 +0100 |
commit | ab2456493dff0eb08b45e98220dfcb1532ddc79e (patch) | |
tree | b50c4b5c4d225aa93d204aa34aa45ff33e25c6a7 | |
parent | 2778d257cce43623fa69588ebca39fd96ee0bf98 (diff) | |
download | NetworkManager-ab2456493dff0eb08b45e98220dfcb1532ddc79e.tar.gz |
utils/core: add NM_UTILS_NS_PER_MSEC macro
-rw-r--r-- | src/nm-core-utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nm-core-utils.h b/src/nm-core-utils.h index 8e6392349b..2fb5273d74 100644 --- a/src/nm-core-utils.h +++ b/src/nm-core-utils.h @@ -317,6 +317,9 @@ int nm_utils_cmp_connection_by_autoconnect_priority (NMConnection **a, NMConnect void nm_utils_log_connection_diff (NMConnection *connection, NMConnection *diff_base, guint32 level, guint64 domain, const char *name, const char *prefix); #define NM_UTILS_NS_PER_SECOND ((gint64) 1000000000) +#define NM_UTILS_NS_PER_MSEC ((gint64) 1000000) +#define NM_UTILS_NS_TO_MSEC_CEIL(nsec) (((nsec) + (NM_UTILS_NS_PER_MSEC - 1)) / NM_UTILS_NS_PER_MSEC) + gint64 nm_utils_get_monotonic_timestamp_ns (void); gint64 nm_utils_get_monotonic_timestamp_us (void); gint64 nm_utils_get_monotonic_timestamp_ms (void); |