From d02eafea83ab2ce3d0c78a8552d0015f738aeffd Mon Sep 17 00:00:00 2001 From: mashaohua7 Date: Wed, 29 Mar 2023 01:14:26 +0000 Subject: [PATCH] update demo/js/entry/src/main/js/MainAbility/pages/index/index.js. Signed-off-by: mashaohua7 --- .../js/entry/src/main/js/MainAbility/pages/index/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/js/entry/src/main/js/MainAbility/pages/index/index.js b/demo/js/entry/src/main/js/MainAbility/pages/index/index.js index a70cc2b..dee9600 100644 --- a/demo/js/entry/src/main/js/MainAbility/pages/index/index.js +++ b/demo/js/entry/src/main/js/MainAbility/pages/index/index.js @@ -38,7 +38,7 @@ export default { const PERIOD_NUM = 100; const STOP_TIME = 2; const FREQ_NUM = 500; - CPU_PERCENT = 25; + const CPU_PERCENT = 25; this.clickTimes++; console.info('optionOnclick' + this.clickTimes); let result; @@ -109,7 +109,7 @@ export default { }, recordOnclick: function () { - SLEEP_TIME = 1000; + const SLEEP_TIME = 1000; this.clickTimes++; console.info('onclick recordOnclick' + this.clickTimes); this.output = ('recordOnclick\n' + this.clickTimes + '\n'); @@ -153,14 +153,14 @@ export default { if(!result) { return; } - this.sleep(1000); + this.sleep(SLEEP_TIME); result = hiperf.resume(); this.output += ('Resume: ' + result + '\n'); if(!result) { return; } - this.sleep(1000); + this.sleep(SLEEP_TIME); result = hiperf.stop(); this.output += ('Stop: ' + result + '\n');