We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35e1cc1 commit 11f5412Copy full SHA for 11f5412
1 file changed
src/persistent_frame.ts
@@ -1,5 +1,6 @@
1
// persistent_frame.ts
2
const WAKE_UP_INTERVAL = 2000;
3
+const RUNNER_RATE = 496.75;
4
let waitState = 0;
5
let lastNow = 0;
6
if (typeof frameElement === "object" && frameElement) {
@@ -22,7 +23,7 @@ if (typeof frameElement === "object" && frameElement) {
22
23
if (waitState === 2) {
24
if (typeof ev.data === "object" && ev.data?.myCustomAction === "waked-up") {
25
if (scheduler_) {
- scheduler_.postTask(() => runner(Date.now()), { priority: "background", delay: 496.75 });
26
+ scheduler_.postTask(() => runner(Date.now()), { priority: "background", delay: RUNNER_RATE });
27
} else {
28
runner(ev.timeStamp);
29
}
0 commit comments