diff --git a/apps_ts/papam_clockinfo_tests/app-config.yaml b/apps_ts/papam_clockinfo_tests/app-config.yaml index ba54ad573..a05b8c520 100644 --- a/apps_ts/papam_clockinfo_tests/app-config.yaml +++ b/apps_ts/papam_clockinfo_tests/app-config.yaml @@ -1 +1 @@ -refreshPeriodSec: 2 \ No newline at end of file +refreshPeriodSec: 10 \ No newline at end of file diff --git a/apps_ts/papam_clockinfo_tests/src/app.ts b/apps_ts/papam_clockinfo_tests/src/app.ts index 616922da3..9d344b9b9 100644 --- a/apps_ts/papam_clockinfo_tests/src/app.ts +++ b/apps_ts/papam_clockinfo_tests/src/app.ts @@ -19,13 +19,15 @@ interface Result { } (function() { + let totalIntervalInMillis: number = appConfig.default.refreshPeriodSec; + function show(this: { interval?: number; emit: (event: string) => void }) { this.interval = setTimeout(() => { this.emit("redraw"); this.interval = setInterval(() => { this.emit("redraw"); - }, 60000); - }, 60000 - (Date.now() % 60000)); + }, totalIntervalInMillis); + }, totalIntervalInMillis - (Date.now() % totalIntervalInMillis)); } function hide(this: { interval?: number }) {