Skip to content

Commit 11f5412

Browse files
committed
Update persistent_frame.ts
1 parent 35e1cc1 commit 11f5412

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/persistent_frame.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// persistent_frame.ts
22
const WAKE_UP_INTERVAL = 2000;
3+
const RUNNER_RATE = 496.75;
34
let waitState = 0;
45
let lastNow = 0;
56
if (typeof frameElement === "object" && frameElement) {
@@ -22,7 +23,7 @@ if (typeof frameElement === "object" && frameElement) {
2223
if (waitState === 2) {
2324
if (typeof ev.data === "object" && ev.data?.myCustomAction === "waked-up") {
2425
if (scheduler_) {
25-
scheduler_.postTask(() => runner(Date.now()), { priority: "background", delay: 496.75 });
26+
scheduler_.postTask(() => runner(Date.now()), { priority: "background", delay: RUNNER_RATE });
2627
} else {
2728
runner(ev.timeStamp);
2829
}

0 commit comments

Comments
 (0)