summaryrefslogtreecommitdiffstats
path: root/pico-watch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pico-watch.cpp')
-rw-r--r--pico-watch.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/pico-watch.cpp b/pico-watch.cpp
index e36c211..e04be23 100644
--- a/pico-watch.cpp
+++ b/pico-watch.cpp
@@ -1,6 +1,7 @@
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/i2c.h"
+#include "hardware/sync.h"
#include "hardware/rtc.h"
#include "pico/util/datetime.h"
@@ -125,7 +126,8 @@ int main() {
app_api.display_write_backbuffer();
app_rendering = false;
}
- sleep_ms(app_api.performance_render_interval_get());
+ if (is_sleeping) __wfi();
+ else sleep_ms(app_api.performance_render_interval_get());
}
return 0;
}