We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34279a3 commit cf5e917Copy full SHA for cf5e917
game/js/Cfunction.js
@@ -24,6 +24,25 @@ window.clearInterval = function (data) {
24
}
25
};
26
27
+window.setTimeout = function(delay, fn, ctx) {
28
+ var start = now();
29
+ var data = Object.create(null);
30
+ data.id = requestAnimationFrame(loop);
31
+
32
+ return data;
33
34
+ function loop() {
35
+ (now() - start) >= delay
36
+ ? fn.call(ctx)
37
+ : data.id = requestAnimationFrame(loop);
38
+ }
39
+}
40
41
42
+window.clearTimeout = function(data) {
43
+ requestAnimationFrame.cancel(data.id);
44
45
46
var $User = (function () {
47
const platform = navigator.platform;
48
const userAgent = navigator.userAgent;
0 commit comments