Fuchsia 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-Original-Commit-Position: refs/heads/master@{#473032}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: eb6e744f08cc8087eb7836753d98d599c28a80f7
9 files changed