MonotonicTime
@interface MonotonicTime : NSObject
A class to calculate monotinic time from the host’s system clock
-
Frequency of the system clock in ticks per second
Declaration
Objective-C
@property (readonly, nonatomic) Float64 frequency;
Swift
var frequency: Float64 { get }
-
A read-only property containing the reference to the system clock
Declaration
Objective-C
@property (readonly, nonatomic) CMClockRef clockref;
Swift
var clockref: CMClock! { get }
-
Return current host time in seconds
Declaration
Objective-C
- (Float64)time;
Swift
func time() -> Float64
Return Value
current host time in seconds (floating point number)
-
Return current hosttime in milliseconds
Declaration
Objective-C
- (Float64)timeMillis;
Swift
func timeMillis() -> Float64
Return Value
current host time in milliseconds
-
Return current host time in microseconds
Declaration
Objective-C
- (Float64)timeMicros;
Swift
func timeMicros() -> Float64
Return Value
current host time in microseconds
-
Return current host time in nanoseconds
Declaration
Objective-C
- (UInt64)timeNanos;
Swift
func timeNanos() -> UInt64
Return Value
current host time in nanos
-
Return this host’s absolute time
Declaration
Objective-C
- (UInt64)absoluteTimeUnits;
Swift
func absoluteTimeUnits() -> UInt64
Return Value
host’s absolute time
-
Return host clock’s frequency
Declaration
Objective-C
- (Float64)hostFrequency;
Swift
func hostFrequency() -> Float64