gpt4 book ai didi

ios - 香港 sleep 分析单位?

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:00:13 27 4
gpt4 key购买 nike

我需要查询 HealthKit 以获取 HKCategoryTypeIdentifierSleepAnalysis 数据,但无法为数量值找到兼容的 HKUnit。 Apple 文档未提及 sleep 分析的单位。我希望有人已经知道答案。

顺便说一句,iOS 健康应用程序在 sleep 图表上显示小时和分钟,但 HKUnit 引用不包括此类复合单位的选项。

最佳答案

Apples documentation我发现了这个:

By comparing the start and end times of these samples, apps can calculate a number of secondary statistics: the amount of time it took for the user to fall asleep, the percentage of time in bed that the user actually spent sleeping, the number of times the user woke while in bed, and the total amount of time spent both in bed and asleep.

这意味着您必须使用样本的 startDate 和 endDate 属性来计算 sleep 持续时间。

关于ios - 香港 sleep 分析单位?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31976780/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com