5 // Created by James McIlree on 4/14/13.
6 // Copyright (c) 2013 Apple. All rights reserved.
13 const AbsTime
AbsTime::BEGINNING_OF_TIME
= AbsTime(0ULL);
14 const AbsTime
AbsTime::END_OF_TIME
= AbsTime(UINT64_MAX
);
16 AbsTime
AbsTime::now() {
17 return AbsTime(mach_absolute_time());
20 NanoTime
AbsTime::nano_time() const {
21 mach_timebase_info_data_t timebase_info
;
22 mach_timebase_info(&timebase_info
);
23 return NanoTime(_time
* timebase_info
.numer
/ timebase_info
.denom
);
26 NanoTime
AbsTime::nano_time(mach_timebase_info_data_t timebase_info
) const {
27 return NanoTime(_time
* timebase_info
.numer
/ timebase_info
.denom
);