summaryrefslogtreecommitdiff
path: root/server/utils.h
diff options
context:
space:
mode:
authorFrancois Gouget <fgouget@codeweavers.com>2015-12-14 11:24:05 +0000
committerFrediano Ziglio <fziglio@redhat.com>2015-12-14 11:24:47 +0000
commit8bddb1444e34e7de85bf6e7832814c211c5f94e4 (patch)
tree9203488e70f789cb24d399f5ea63dce798eefa64 /server/utils.h
parent5c9fb9a0f3be945e19f4cdeb86a7732ae218888c (diff)
server: Add time constants to go with spice_get_monotonic_time_ms()
They clarify the time unit being used and simplify calculations. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Diffstat (limited to 'server/utils.h')
-rw-r--r--server/utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/utils.h b/server/utils.h
index b85b1048..00631f81 100644
--- a/server/utils.h
+++ b/server/utils.h
@@ -62,6 +62,8 @@ static inline red_time_t spice_get_monotonic_time_ns(void)
return NSEC_PER_SEC * time.tv_sec + time.tv_nsec;
}
+#define MSEC_PER_SEC 1000
+
static inline red_time_t spice_get_monotonic_time_ms(void)
{
return g_get_monotonic_time() / 1000;