Use CLOCK_REALTIME

This commit is contained in:
Adrien Gallouët
2016-07-05 15:40:15 +00:00
parent 6dd9e410c8
commit bd203dd291

4
mud.c
View File

@@ -175,9 +175,9 @@ static
uint64_t mud_now (struct mud *mud)
{
uint64_t now;
#if defined CLOCK_MONOTONIC
#if defined CLOCK_REALTIME
struct timespec tv;
clock_gettime(CLOCK_MONOTONIC, &tv);
clock_gettime(CLOCK_REALTIME, &tv);
now = tv.tv_sec*MUD_ONE_SEC+tv.tv_nsec/MUD_ONE_MSEC;
#else
struct timeval tv;