HKUnit.swift 492 B

123456789101112131415161718192021
  1. //
  2. // HKUnit.swift
  3. // xDripG5
  4. //
  5. // Created by Nate Racklyeft on 8/6/16.
  6. // Copyright © 2016 Nathan Racklyeft. All rights reserved.
  7. //
  8. import HealthKit
  9. public extension HKUnit {
  10. public static let milligramsPerDeciliter: HKUnit = {
  11. return HKUnit.gramUnit(with: .milli).unitDivided(by: HKUnit.literUnit(with: .deci))
  12. }()
  13. public static let milligramsPerDeciliterPerMinute: HKUnit = {
  14. return HKUnit.milligramsPerDeciliter.unitDivided(by: .minute())
  15. }()
  16. }