summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 90775edab3..8a98010a5c 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -373,9 +373,11 @@ int settings_save( void )
{
static long lasttime = 0;
+ int elapsed_secs;
- global_settings.runtime += (current_tick - lasttime) / HZ;
- lasttime = current_tick;
+ elapsed_secs = (current_tick - lasttime) / HZ;
+ global_settings.runtime += elapsed_secs;
+ lasttime += (elapsed_secs * HZ);
if ( global_settings.runtime > global_settings.topruntime )
global_settings.topruntime = global_settings.runtime;