SKSensorTimestamp Class Reference

Inherits from NSObject
Conforms to NSCopying
Declared in SKSensorTimestamp.h

Overview

SKSensorTimestamp object represent a single point in time.

+ sensorTimestampFromDate:

Creates and returns a new SKSensorTimestamp from an NSDate object. If the sensor does not provide an NSDate object, [NSDate date] can be used.

+ (instancetype)sensorTimestampFromDate:(NSDate *)date

Parameters

date

The absolute date that this SKSensorTimestamp object should be initialized with.

Return Value

A new SKSensorTimestamp object initialized with the (NSDate *)date parameter.

Declared In

SKSensorTimestamp.h

+ sensorTimestampFromTimeInterval:

Creates and returns a new SKSensorTimestamp from a NSTimeInterval object. The time interval should be relative to the last time the device was boot. If the sensor does not provide this value, [NSProcessInfo processInfo].systemUptime can be used.

+ (instancetype)sensorTimestampFromTimeInterval:(NSTimeInterval)timeInterval

Parameters

timeInterval

The number of seconds since the last time the device was boot.

Return Value

A new SKSensorTimestamp object initialized relative to the timeInterval parameter.

Declared In

SKSensorTimestamp.h

  timestamp

Returns an NSDate object of the sensor timestamp.

@property (nonatomic, readonly, copy) NSDate *timestamp

Declared In

SKSensorTimestamp.h

  timeIntervalSinceLastBoot

Returns the interval between the timestamp and the last time the device was boot.

@property (nonatomic, readonly) NSTimeInterval timeIntervalSinceLastBoot

Declared In

SKSensorTimestamp.h

  timestampDictionary

Returns a dictionary that encapsulates the timestamp as a string, the interval since 1970, and the interval since the device was boot.

@property (nonatomic, readonly, copy) NSDictionary *timestampDictionary

Declared In

SKSensorTimestamp.h

  timestampString

Returns a string representation of the timestamp. The format of the string is “yyyy-MM-dd HH:mm:ss.SSS ZZZ”.

@property (nonatomic, readonly, copy) NSString *timestampString

Declared In

SKSensorTimestamp.h

  timeIntervalSince1970

Returns the interval between the timestamp and 00:00:00 UTC on 1 January 1970.

@property (nonatomic, readonly) NSTimeInterval timeIntervalSince1970

Declared In

SKSensorTimestamp.h