diff options
Diffstat (limited to 'crates/tor-basic-utils')
| -rw-r--r-- | crates/tor-basic-utils/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/tor-basic-utils/src/rangebounds.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/tor-basic-utils/Cargo.toml b/crates/tor-basic-utils/Cargo.toml index 783a38bd5..ade411c07 100644 --- a/crates/tor-basic-utils/Cargo.toml +++ b/crates/tor-basic-utils/Cargo.toml @@ -24,6 +24,7 @@ slab = "0.4.7" smallvec = "1.10" thiserror = "2" weak-table = "0.3.0" +web-time-compat = { version = "0.1.0", path = "../web-time-compat" } [dev-dependencies] derive_more = { version = "2.0.1", features = ["full"] } diff --git a/crates/tor-basic-utils/src/rangebounds.rs b/crates/tor-basic-utils/src/rangebounds.rs index 14c8f9c75..77a353484 100644 --- a/crates/tor-basic-utils/src/rangebounds.rs +++ b/crates/tor-basic-utils/src/rangebounds.rs @@ -114,7 +114,7 @@ mod test { use super::*; use Bound::{Excluded as Excl, Included as Incl, Unbounded}; use std::fmt::Debug; - use std::time::{Duration, SystemTime}; + use web_time_compat::{Duration, SystemTime, SystemTimeExt}; /// A helper that computes the intersection of `range1` and `range2`. /// @@ -247,7 +247,7 @@ mod test { // [t1, t2]: [.......] // [t3, t4]: [.......] // intersection: [...] - let now = SystemTime::now(); + let now = SystemTime::get(); let t1 = now; let t2 = now + 2 * MIN; |
