]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
time: use mach_absolute_time() for monotonic time
authorKefu Chai <kchai@redhat.com>
Sat, 9 Sep 2017 17:19:28 +0000 (01:19 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Sep 2017 02:43:32 +0000 (10:43 +0800)
commit8857a3019a0f9b14a744c51f9411ffdbc51ce3b6
tree05f74d9ea9df518a6f64acb66ee21d19ba96af61
parent6688768399f239923a98552f2305632f4888eec4
time: use mach_absolute_time() for monotonic time

* use mach_absolute_time() for monotonic time
  mach_absolute_time() is faster and monotonic, see
  https://developer.apple.com/library/content/qa/qa1398/_index.html

  for its implementation, see
  https://opensource.apple.com/source/xnu/xnu-3248.60.10/libsyscall/wrappers/mach_absolute_time.s

  it's using rdtsc.
* and remove unnecessary headers from ceph_time.h

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/ceph_time.cc
src/common/ceph_time.h