Class

UnitDuration

A unit of measure for duration of time.

Declaration

class UnitDuration : Dimension

Overview

You typically use instances of NSUnitDuration to represent specific quantities of planar angle using the NSMeasurement class.

Duration

Duration is a quantity of time. The SI unit for time is the second (sec), which is defined in terms of the radioactivity of a cesium-133 atom. Duration is also commonly expressed in terms of minutes (min) and hours (hr).

The NSUnitDuration class defines its base unit as seconds, and provides the following units, which are initialized using UnitConverterLinear converters with the specified coefficients:

Name

Method

Symbol

Coefficient

Seconds

seconds

sec

1

Minutes

minutes

min

60

Hours

hours

hr

3600

Topics

Accessing Predefined Units

class var seconds: UnitDuration

Returns the second unit of duration.

class var minutes: UnitDuration

Returns the minute unit of duration.

class var hours: UnitDuration

Returns the hour unit of duration.

Relationships

Inherits From

See Also

Time and Motion

class UnitAcceleration

A unit of measure for acceleration.

class UnitFrequency

A unit of measure for frequency.

class UnitSpeed

A unit of measure for speed.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software