ESTSettingDeviceInfoUTCTime

@interface ESTSettingDeviceInfoUTCTime : ESTSettingReadWrite <NSCopying>

ESTSettingDeviceInfoUTCTime represents Device UTCTime value.

  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithValue:(NSTimeInterval)UTCTime;

    Swift

    init(value UTCTime: TimeInterval)

    Parameters

    UTCTime

    UTCTime value - time interval since 1970. The fraction part (milliseconds) is discarded.

    Return Value

    Initialized object. Nil if validation fails.

  • Returns current value of UTCTime setting.

    Declaration

    Objective-C

    - (NSTimeInterval)getValue;

    Swift

    func getValue() -> TimeInterval

    Return Value

    Time interval since 1970 (UTC time).

  • Method allows to read value of initialized Device UTCTime setting object.

    Declaration

    Objective-C

    - (void)readValueWithCompletion:
        (nonnull ESTSettingDeviceInfoUTCTimeCompletionBlock)completion;

    Swift

    func readValue(completion: @escaping ESTSettingDeviceInfoUTCTimeCompletionBlock)

    Parameters

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method allows to create write operation from already initialized Device UTCTime setting object. Value provided during initialization will be used as a desired value.

    Declaration

    Objective-C

    - (void)writeValue:(NSTimeInterval)UTCTime
            completion:
                (nonnull ESTSettingDeviceInfoUTCTimeCompletionBlock)completion;

    Swift

    func writeValue(_ UTCTime: TimeInterval, completion: @escaping ESTSettingDeviceInfoUTCTimeCompletionBlock)

    Parameters

    UTCTime

    UTCTime value to be written to the device.

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method checks if provided value is allowed. Returns nil if validation passes.

    Declaration

    Objective-C

    + (NSError *_Nullable)validationErrorForValue:(NSTimeInterval)UTCTime;

    Swift

    class func validationError(forValue UTCTime: TimeInterval) -> Error?

    Parameters

    UTCTime

    UTCTime value.

    Return Value

    Error object describing why validation failed. Nil if validation passes.