commit | 39e5faa419bfce4aee5172cf32c760180d698810 | [log] [tgz] |
---|---|---|
author | chihchung <chihchung@chromium.org> | Mon Oct 03 08:29:37 2016 |
committer | Commit bot <commit-bot@chromium.org> | Mon Oct 03 08:31:11 2016 |
tree | b4ec277102f9c904ea3e7993a32aca3b6c275605 | |
parent | 666af71049d1b77a81ba9c15da70da466fdc6abd [diff] |
Avoid 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. Review-Url: https://codereview.chromium.org/2361803002 Cr-Commit-Position: refs/heads/master@{#422390}