mirror of
https://github.com/Tha14/toxic.git
synced 2025-11-29 16:46:40 +01:00
simplify timeout function
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user