DescriptionFuchsia port of base/time, with some refactoring of POSIX time modules.
Uses Magenta's mx_time_get() system call to implement base::Time::Now(),
base::TimeTicks::Now(), and base::ThreadTicks::Now(). All other time
implementation uses the POSIX-compatible API.
As part of this change, it became necessary to do a little clean-up and
fork time_posix.cc into three separate files: time_conversion_posix.cc,
time_exploded_posix.cc, and time_now_posix.cc. The code in these files
was not modified, sans some #ifdef's that were no longer necessary (and
some `git cl format` indentation changes).
Then, the BUILD file includes only the needed implementation files for
each platform:
1. Fuchsia: time_fuchsia.cc, time_conversion_posix.cc and
time_exploded_posix.cc.
2. Mac/IOS: time_mac.cc and time_conversion_posix.cc.
3. All other POSIX platforms (such as CrOS, Android, and Linux): The
three time_*_posix.cc files.
Testing notes: Since base_unittests doesn't compile yet, I could only
confirm that the base/time/* code changes compile on Fuchsia. That said,
base_unittests compiles and runs successfully on all other platforms.
BUG=706592
Review-Url: https://codereview.chromium.org/2891583002
Cr-Commit-Position: refs/heads/master@{#473032}
Committed: https://chromium.googlesource.com/chromium/src/+/eb6e744f08cc8087eb7836753d98d599c28a80f7
Patch Set 1 #
Total comments: 18
Patch Set 2 : Fix Mac Time::Explode() error, CHECK(clock_gettime()), comment in prefetch_predictor_tool.py. #Patch Set 3 : Use helper function to convert mx_time_t to microsecond time in time_fuchsia.cc. #Patch Set 4 : REBASE before commit. #
Messages
Total messages: 33 (20 generated)
|