We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8047815 commit 9c7334dCopy full SHA for 9c7334d
src/poll/timeval.cpp
@@ -1,14 +1,13 @@
1
#include "timeval.hpp"
2
3
-timeval operator-(timeval const &lhs, timeval const &rhs)
4
-{
5
- timeval result;
6
- result.tv_sec = lhs.tv_sec - rhs.tv_sec;
7
- result.tv_usec = lhs.tv_usec - rhs.tv_usec;
+timeval operator-(timeval const &lhs, timeval const &rhs) {
+ timeval result;
+ result.tv_sec = lhs.tv_sec - rhs.tv_sec;
+ result.tv_usec = lhs.tv_usec - rhs.tv_usec;
8
9
- if (result.tv_usec < 0) {
10
- result.tv_sec -= 1;
11
- result.tv_usec += 1000000;
12
- }
13
- return result;
+ if (result.tv_usec < 0) {
+ result.tv_sec -= 1;
+ result.tv_usec += 1000000;
+ }
+ return result;
14
}
0 commit comments