Use monotonic time function already in toxcore.

This commit is contained in:
irungentoo 2014-10-15 13:28:19 -04:00
parent 3d1c0f0536
commit 9ef1be1b6f
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -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)