Summary:
Fixed unsigned/signed compares.
I had to suppress the warning in one place, but don't worry, clang
supports `#pragma GCC diagnostic ...` (see http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas)
Test Plan: unit tests
Reviewed By: afrind@fb.com
Subscribers: alandau, mshneer, trunkagent, doug, jdperlow, bmatheny, njormrod, cgheorghe, folly-diffs@
FB internal diff:
D1624249
Tasks:
5140804
Signature: t1:
1624249:
1414620209:
5399e8d90d8ca32b30794a7b2a4a7c2d7d437dda
return end.tv_nsec - start.tv_nsec;
}
assert(end.tv_sec > start.tv_sec &&
- end.tv_sec - start.tv_sec <
+ (uint64_t)(end.tv_sec - start.tv_sec) <
std::numeric_limits<uint64_t>::max() / 1000000000UL);
return (end.tv_sec - start.tv_sec) * 1000000000UL
+ end.tv_nsec - start.tv_nsec;