1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 21:23:01 +01:00

fix rare bug preventing toxcore from sleeping

This commit is contained in:
Jfreegman 2015-08-08 12:55:46 -04:00
parent ecefc19b23
commit 0047ba0e9f
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -1048,7 +1048,7 @@ static int init_default_data_files(void)
/* Adjusts usleep value so that tox_do runs close to the recommended number of times per second */
static useconds_t optimal_msleepval(uint64_t *looptimer, uint64_t *loopcount, uint64_t cur_time, useconds_t msleepval)
{
useconds_t new_sleep = msleepval;
useconds_t new_sleep = MAX(msleepval, 3);
++(*loopcount);
if (*looptimer == cur_time)