1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-05 20:26:46 +02:00

simplify timeout function

This commit is contained in:
Jfreegman
2015-08-18 01:46:22 -04:00
parent f173f4275e
commit 327259c4c8
8 changed files with 21 additions and 27 deletions

View File

@ -65,9 +65,9 @@ uint64_t get_unix_time(void)
}
/* Returns 1 if connection has timed out, 0 otherwise */
int timed_out(uint64_t timestamp, uint64_t curtime, uint64_t timeout)
int timed_out(uint64_t timestamp, uint64_t timeout)
{
return timestamp + timeout <= curtime;
return timestamp + timeout <= get_unix_time();
}
/* Get the current local time */