summaryrefslogtreecommitdiff
path: root/src/app.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-06 11:52:26 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-06 11:52:26 +0200
commit6a565ea71745aaf4c91a7698bbf56f7d906fcaaa (patch)
treee68ed6140097be20ab51193dfd25ac1a4d1c502d /src/app.h
parente43ecd3eb279e117cbce8fd507ecef247938e4ac (diff)
Added build option for sleeping while idle
It appears at least on macOS, SDL is doing a while lot of stuff while waiting for new events. Perhaps because it has some sort of high-frequency input/sensor processing? Not sure. Now Lagrange will idle by polling events every 15 ms and sleeping in between. This reduces CPU time by an order of magnitude on macOS. Need to still test on other platforms.
Diffstat (limited to 'src/app.h')
-rw-r--r--src/app.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/app.h b/src/app.h
index bc086dfe..743484a5 100644
--- a/src/app.h
+++ b/src/app.h
@@ -46,6 +46,7 @@ enum iAppEventMode {
46enum iUserEventCode { 46enum iUserEventCode {
47 command_UserEventCode = 1, 47 command_UserEventCode = 1,
48 refresh_UserEventCode = 2, 48 refresh_UserEventCode = 2,
49 asleep_UserEventCode = 3,
49}; 50};
50 51
51const iString *execPath_App (void); 52const iString *execPath_App (void);