Simplify delay.tv_usec calculation from BenBE

Closes #761
This commit is contained in:
Daniel Lange 2021-08-23 10:42:08 +02:00
parent ccb756d3c7
commit a912512ac9
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
if (!timercmp(&pl->realtime, &(data->time), <)) {
int globalDelay = this->pl->settings->delay;
struct timeval delay = { .tv_sec = globalDelay / 10, .tv_usec = (globalDelay - ((globalDelay / 10) * 10)) * 100000L };
struct timeval delay = { .tv_sec = globalDelay / 10, .tv_usec = (globalDelay % 10) * 100000L };
timeradd(&pl->realtime, &delay, &(data->time));
for (int i = 0; i < nValues - 1; i++)