ActiveDurationText
Composable to make it easier to create a chronometer from Health Services exercise data.
ActiveDurationText provides a text-based chronometer, which can be styled using the same means as a Text component, and which should only recompose once-per second as the chronometer ticks.
Things to note that ActiveDurationText aims to workaround:
Health Services does not guarantee ExerciseUpdate messages every second, so these must not be used to drive a ticker.
The ActiveDuration delivered in an ExerciseUpdate will not fall on a second-boundary, so the delivery time of these messages cannot be used to determine when to update any content on the screen through a ticker.
Parameters
The checkpoint from the most recent state change. This is supplied in the ExerciseUpdate messages from ExerciseClient.
The current state of the exercise. This is supplied in the ExerciseUpdate messages from ExerciseClient.
The content slot taking a duration.