1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 10:23:26 +01:00

fix rare bug preventing toxcore from sleeping

This commit is contained in:
Jfreegman 2015-08-08 12:55:46 -04:00 committed by cnhenry
parent 60b4d62657
commit 750258adef

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)