Class YMKAdjustedClock

Instance Methods

- now

This method returns the time that has been synchronized with Yandex servers.

- pause

Notifies AdjustedClock when the application pauses and goes to the background.

- resume

Notifies AdjustedClock when the application resumes the foreground state.

Properties

valid

Tells if this object is valid or no.

Method Detail

-now

- (nonnull NSDate *)now

This method returns the time that has been synchronized with Yandex servers.

Use it if you don't trust the time on the local device because the user could have set it incorrectly. If time synchronization has failed or not yet finished, the returned value equals the local device's time.

Returns:

POSIX time. For more information, see https://en.wikipedia.org/wiki/Unix_time.

-pause

- (void)pause

Notifies AdjustedClock when the application pauses and goes to the background.

-resume

- (void)resume

Notifies AdjustedClock when the application resumes the foreground state.

Property Detail

valid

(assign, readonly, getter=isValid) BOOL valid

Tells if this object is valid or no.

Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.