ARTContinuousClock
Objective-C
@interface ARTContinuousClock : NSObject
Swift
class ARTContinuousClock : NSObject
A clock that increments monotonically, including while the system is asleep.
Note
We don’t give this one anNS_SWIFT_NAME
, to avoid confusion with the Swift standard library type also named ContinuousClock
.
-
Returns the current instant in time.
Declaration
Objective-C
- (nonnull ARTContinuousClockInstant *)now;
Swift
func now() -> ARTContinuousClockInstant
-
Returns the instant in time that occurs after a given duration has elapsed in relation to a given instant in time.
Declaration
Objective-C
- (nonnull ARTContinuousClockInstant *) addingDuration:(NSTimeInterval)duration toInstant:(nonnull ARTContinuousClockInstant *)instant;
Swift
func addingDuration(_ duration: TimeInterval, to instant: ARTContinuousClockInstant) -> ARTContinuousClockInstant