summaryrefslogtreecommitdiff
path: root/ext/web/Cargo.toml
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-05-17 13:59:55 -0600
committerGitHub <noreply@github.com>2023-05-17 13:59:55 -0600
commitad223362451688c13a4441563210f58bdb046a78 (patch)
tree81e041febfdcd83040f3b50bfad247b53a70c3f6 /ext/web/Cargo.toml
parent1541c2ac9b9b4380adeedad10ed87682c0fc6d49 (diff)
feat(ext/web): Request higher-resolution timer on Windows if user requests setTimeout w/short delay (#19149)
If a timer is requested with <=100ms resolution, request the high-res timer. Since the default Windows timer period is 15ms, this means a 100ms timer could fire at 115ms (15% late). We assume that timers longer than 100ms are a reasonable cutoff here. The high-res timers on Windows are still limited. Unfortuntely this means that our shortest duration 4ms timers can still be 25% late, but without a more complex timer system or spinning on the clock itself, we're somewhat bounded by the OS' scheduler itself.
Diffstat (limited to 'ext/web/Cargo.toml')
-rw-r--r--ext/web/Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/web/Cargo.toml b/ext/web/Cargo.toml
index 9ac7217f1..ebb602c5c 100644
--- a/ext/web/Cargo.toml
+++ b/ext/web/Cargo.toml
@@ -22,6 +22,7 @@ flate2.workspace = true
serde = "1.0.149"
tokio.workspace = true
uuid = { workspace = true, features = ["serde"] }
+windows-sys.workspace = true
[dev-dependencies]
deno_bench_util.workspace = true