From 9ef1be1b6f01e2b1c2209365956e1d2c35ea91a3 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Wed, 15 Oct 2014 13:28:19 -0400 Subject: [PATCH] Use monotonic time function already in toxcore. --- testing/irc_syncbot.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testing/irc_syncbot.c b/testing/irc_syncbot.c index 2a6550b9..9a081f8e 100644 --- a/testing/irc_syncbot.c +++ b/testing/irc_syncbot.c @@ -33,11 +33,12 @@ int sock; #define SERVER_CONNECT "NICK "IRC_NAME"\nUSER "IRC_NAME" 8 * :"IRC_NAME"\n" #define CHANNEL_JOIN "JOIN "IRC_CHANNEL"\n" +/* In toxcore/network.c */ +uint64_t current_time_monotonic(void); + uint64_t get_monotime_sec(void) { - struct timespec monotime; - clock_gettime(CLOCK_MONOTONIC_RAW, &monotime); - return monotime.tv_sec; + return current_time_monotonic() / 1000; } int reconnect(void)