DescriptionAvoid unnecessary checking in getting current time on 32-bit systems.
In ConvertTimespecToMicros(), int64_t is large enough to keep 32-bit time values in microseconds. The arithmetic checking for multiplication involves 64-bit division and can be slow. ConvertTimespecToMicros() is used by ClockNow(), and that can be used often.
Committed: https://crrev.com/39e5faa419bfce4aee5172cf32c760180d698810
Cr-Commit-Position: refs/heads/master@{#422390}
Patch Set 1 #Patch Set 2 : update comments #Messages
Total messages: 13 (9 generated)
|