How should the sleepTime and wakeTime be interpreted from Class: Toybox::UserProfile::Profile ?
Unfortunately it is not documented.
Is it the most recent sleepTime and wakeTime from resp. yesterday and today?
My guess is that these are the "Normal Sleep Times" configured in the user profile rather than anything detected from previous days.
For instance I have my sleep time set to 11pm and my wake time to 7am. Is there a way to get those times?
I would also like to know what these are. They are Duration objects and hold an immutable time span. So you can call the value() function on them and it returns the number of seconds in the duration. Perhaps it is the amount of time sleep or awake is active based on the user settings of Sleep time and Awake time? I would like to be able to actually access the time that the user has set for sleep and awake time. Does anyone know of a way to get that information? For instance I have my sleep time set to 11pm and my wake time to 7am. Is there a way to get those times? I think the sleepTime would return a duration of 8 hours and wakeTime would be 16 hours. This information is not all that helpful for what I want to do, if I could get the actual times I could figure out the duration myself as well as being able to calculate how much wake time or sleep time is left from the current time.
hours = profile.wakeTime.divide( 3600 ).value();
minutes = profile.wakeTime.value() - ( hours * 3600 );
seconds = profile.wakeTime.value() - ( hours * 3600 ) - ( minutes * 60 );
string = "Wake Time: " + hours.format("%02u") + ":" + minutes.format("%02u") + ":" + seconds.format("%02u");