Skip to content

Commit

Permalink
Merge pull request #255 from AntoniosBarotsis/master
Browse files Browse the repository at this point in the history
Add WASM support
  • Loading branch information
antifuchs authored Jan 24, 2025
2 parents 0f25b1e + eb38e1f commit 81755bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions governor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ futures-timer = { version = "3.0.3", optional = true }
futures-util = { version = "0.3.31", optional = true, default-features = false, features = ["std", "sink"] }
futures-sink = { version = "0.3.31", optional = true }
rand = { version = "0.8.0", optional = true }
getrandom = { version = "0.2", features = ["js"] }
dashmap = { version = "6.1.0", optional = true }
quanta = { version = "0.12.0", optional = true }
no-std-compat = { version = "0.4.1", features = [ "alloc" ] }
cfg-if = "1.0"

# To ensure we don't pull in vulnerable smallvec, see https://github.com/antifuchs/governor/issues/60
smallvec = "1.6.1"
web-time = "1.1.0"
3 changes: 2 additions & 1 deletion governor/src/clock/with_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use std::prelude::v1::*;

use crate::nanos::Nanos;
use std::ops::Add;
use std::time::{Duration, Instant, SystemTime};
use std::time::{Duration, SystemTime};
use web_time::Instant;

/// The monotonic clock implemented by [`Instant`].
#[derive(Clone, Debug, Default)]
Expand Down

0 comments on commit 81755bc

Please sign in to comment.