Commit 5ce0c1e8 by Gabriel Kerneis

Flawed logic in timeval_minus

1 parent 81306c60
Showing 1 changed file with 1 additions and 1 deletions
......@@ -45,7 +45,7 @@ void
timeval_minus(struct timeval *d,
const struct timeval *s1, const struct timeval *s2)
{
if(s1->tv_usec > s2->tv_usec) {
if(s1->tv_usec >= s2->tv_usec) {
d->tv_usec = s1->tv_usec - s2->tv_usec;
d->tv_sec = s1->tv_sec - s2->tv_sec;
} else {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!