Skip to content

Commit 7ad8048

Browse files
committed
fix(time): replace stray reference to UNIX_EPOCH
1 parent e151436 commit 7ad8048

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ tokio = { version = "1", features = ["sync", "macros"] }
7474
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
7575
tracing-test = "0.2.5"
7676

77+
[target.'cfg(target_arch = "wasm32")'.dependencies]
78+
tracing-subscriber = { version = "0.3.20", default-features = false, features = ["env-filter", "fmt", "json", "registry"] }
79+
7780
[features]
7881
default = ["metrics", "rpc", "fs-store"]
7982
metrics = ["iroh-metrics/metrics", "iroh/metrics"]

src/store/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::{
1111
use anyhow::{anyhow, Result};
1212
use ed25519_dalek::{SignatureError, VerifyingKey};
1313
use iroh_blobs::Hash;
14+
use n0_future::time::SystemTime;
1415
use rand::CryptoRng;
1516
use redb::{Database, ReadableMultimapTable, ReadableTable};
1617
use tracing::warn;
@@ -487,7 +488,7 @@ impl Store {
487488
let peer = &peer;
488489
let namespace = namespace.as_bytes();
489490
// calculate nanos since UNIX_EPOCH for a time measurement
490-
let nanos = std::time::UNIX_EPOCH
491+
let nanos = SystemTime::UNIX_EPOCH
491492
.elapsed()
492493
.map(|duration| duration.as_nanos() as u64)?;
493494
self.modify(|tables| {

0 commit comments

Comments
 (0)