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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user