| 122 | } |
| 123 | |
| 124 | void SystemClass::restart(unsigned deferMillis) |
| 125 | { |
| 126 | if(deferMillis == 0) { |
| 127 | queueCallback(system_restart); |
| 128 | } else { |
| 129 | auto timer = new AutoDeleteTimer; |
| 130 | timer->initializeMs(deferMillis, system_restart).startOnce(); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | bool SystemClass::deepSleep(uint32_t timeMilliseconds, DeepSleepOptions options) |
| 135 | { |