gw.sleep(...) and milis()
-
When using
gw.sleep( INTERRUPT, CHANGE, SLEEP_TIME );I noticed that the millis() are not updated until the board wakes up again.
Is that how it is supposed to be?
If so, is there an alternative?
Based on the millis() before and after the sleep I want to execute different methods...
Due to the fact that I use the interrupt I obviously don't know how much time lies between the two. -
When using
gw.sleep( INTERRUPT, CHANGE, SLEEP_TIME );I noticed that the millis() are not updated until the board wakes up again.
Is that how it is supposed to be?
If so, is there an alternative?
Based on the millis() before and after the sleep I want to execute different methods...
Due to the fact that I use the interrupt I obviously don't know how much time lies between the two.Yes, it is a fact we have to live with. You can look at the return-value if wake-up was triggered by external interrupt or timer.
If timer triggered wake-up you know how long the sensor has slept. But if wakeup was triggered by external interrupt there is no way to know how long it slept.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login