1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: remove unnecessary condition in comparison of timeval structures

Ref: https://github.com/weechat/weechat-relay/pull/3
This commit is contained in:
Sébastien Helleu
2023-04-14 13:06:18 +02:00
parent 70bf3f8671
commit 49ff42bef5
-6
View File
@@ -259,12 +259,6 @@ util_timeval_diff (struct timeval *tv1, struct timeval *tv2)
diff_sec = tv2->tv_sec - tv1->tv_sec;
diff_usec = tv2->tv_usec - tv1->tv_usec;
if (diff_usec < 0)
{
diff_usec += 1000000;
diff_sec--;
}
return (diff_sec * 1000000) + diff_usec;
}