gw.sleep(...) and milis()


  • Mod

    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.


  • Admin

    @marceltrapman

    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.


Log in to reply
 

Suggested Topics

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts