summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index f27bbac099..a2cda985d4 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1148,6 +1148,16 @@ static bool view_runtime(void)
1148#endif 1148#endif
1149 1149
1150 if (state & 1) { 1150 if (state & 1) {
1151 if (charger_inserted())
1152 {
1153 global_settings.runtime = 0;
1154 }
1155 else
1156 {
1157 global_settings.runtime += ((current_tick - lasttime) / HZ);
1158 }
1159 lasttime = current_tick;
1160
1151 t = global_settings.runtime; 1161 t = global_settings.runtime;
1152 lcd_puts(0, y++, "Current time"); 1162 lcd_puts(0, y++, "Current time");
1153 } 1163 }
@@ -1162,7 +1172,7 @@ static bool view_runtime(void)
1162 lcd_update(); 1172 lcd_update();
1163 1173
1164 /* Wait for a key to be pushed */ 1174 /* Wait for a key to be pushed */
1165 key = button_get_w_tmo(HZ*5); 1175 key = button_get_w_tmo(HZ);
1166 switch(key) { 1176 switch(key) {
1167#ifdef HAVE_PLAYER_KEYPAD 1177#ifdef HAVE_PLAYER_KEYPAD
1168 case BUTTON_STOP | BUTTON_REL: 1178 case BUTTON_STOP | BUTTON_REL: