summaryrefslogtreecommitdiff
path: root/crates/tor-dirclient/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tor-dirclient/src')
-rw-r--r--crates/tor-dirclient/src/lib.rs3
-rw-r--r--crates/tor-dirclient/src/request.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/crates/tor-dirclient/src/lib.rs b/crates/tor-dirclient/src/lib.rs
index 5939cc2ba..923423a26 100644
--- a/crates/tor-dirclient/src/lib.rs
+++ b/crates/tor-dirclient/src/lib.rs
@@ -593,6 +593,7 @@ mod test {
use tor_rtmock::io::stream_pair;
use tor_rtmock::simple_time::SimpleMockTimeProvider;
+ use web_time_compat::{SystemTime, SystemTimeExt};
use futures_await_test::async_test;
@@ -633,7 +634,7 @@ mod test {
// We don't need to do anything fancy here, since we aren't simulating
// a timeout.
#[allow(deprecated)] // TODO #1885
- let mock_time = SimpleMockTimeProvider::from_wallclock(std::time::SystemTime::now());
+ let mock_time = SimpleMockTimeProvider::from_wallclock(SystemTime::get());
let mut output = Vec::new();
let mut stream = match get_decoder(data, encoding, AnonymizedRequest::Direct) {
diff --git a/crates/tor-dirclient/src/request.rs b/crates/tor-dirclient/src/request.rs
index ab4412a3f..476b86124 100644
--- a/crates/tor-dirclient/src/request.rs
+++ b/crates/tor-dirclient/src/request.rs
@@ -831,6 +831,7 @@ mod test {
//! <!-- @@ end test lint list maintained by maint/add_warning @@ -->
use super::sealed::RequestableInner;
use super::*;
+ use web_time_compat::SystemTimeExt;
#[test]
fn test_md_request() -> Result<()> {
@@ -915,7 +916,7 @@ mod test {
.unwrap();
let d2 = b"blah blah blah 12 blah blah blah";
- let d3 = SystemTime::now();
+ let d3 = SystemTime::get();
let mut req = ConsensusRequest::default();
let when = httpdate::fmt_http_date(d3);