update demo/js/entry/src/main/js/MainAbility/pages/index/index.js.

Signed-off-by: mashaohua7 <mashaohua7@huawei.com>
This commit is contained in:
mashaohua7 2023-03-29 01:14:26 +00:00 committed by Gitee
parent 9acb7e302b
commit d02eafea83
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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');