mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Use monotonic time function already in toxcore.
This commit is contained in:
parent
3d1c0f0536
commit
9ef1be1b6f
|
@ -33,11 +33,12 @@ int sock;
|
||||||
#define SERVER_CONNECT "NICK "IRC_NAME"\nUSER "IRC_NAME" 8 * :"IRC_NAME"\n"
|
#define SERVER_CONNECT "NICK "IRC_NAME"\nUSER "IRC_NAME" 8 * :"IRC_NAME"\n"
|
||||||
#define CHANNEL_JOIN "JOIN "IRC_CHANNEL"\n"
|
#define CHANNEL_JOIN "JOIN "IRC_CHANNEL"\n"
|
||||||
|
|
||||||
|
/* In toxcore/network.c */
|
||||||
|
uint64_t current_time_monotonic(void);
|
||||||
|
|
||||||
uint64_t get_monotime_sec(void)
|
uint64_t get_monotime_sec(void)
|
||||||
{
|
{
|
||||||
struct timespec monotime;
|
return current_time_monotonic() / 1000;
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &monotime);
|
|
||||||
return monotime.tv_sec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int reconnect(void)
|
int reconnect(void)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user