secondUnit(with:)
Returns a HealthKit unit for measuring time, using second units with the provided prefix.
Declaration
class func secondUnit(with prefix: HKMetricPrefix) -> SelfParameters
- prefix:
A valid metric prefix value. For the complete list of prefix values, see Hkmetricprefix.
Return Value
A HealthKit unit for measuring time based on seconds and the provided prefix.
Discussion
This method is used to create prefixed versions of seconds. Common uses include creating millisecond units, as shown below.