File: catimg/blob/master/src/catimg.c#L138
i.e
usleep(img.delays[frame - 1] * 10000);
The usleep() function suspends execution of the calling thread for (at least) usec microseconds.
The parameter you pass is a minimum time for sleeping. There's no guarantee that the thread will wake up after exactly the time specified. Given the specific dynamics of the scheduler, it may result in longer than expected delays.
Use nanosleep() instead.
Cheers!
File: catimg/blob/master/src/catimg.c#L138
i.e
usleep(img.delays[frame - 1] * 10000);The
usleep()function suspends execution of the calling thread for (at least) usec microseconds.The parameter you pass is a minimum time for sleeping. There's no guarantee that the thread will wake up after exactly the time specified. Given the specific dynamics of the scheduler, it may result in longer than expected delays.
Use
nanosleep()instead.Cheers!