iota_sdk/utils/
mod.rs

1// Copyright 2023 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4#[cfg(feature = "serde")]
5pub mod serde;
6
7#[cfg(feature = "instant")]
8pub fn unix_timestamp_now() -> core::time::Duration {
9    instant::SystemTime::now()
10        .duration_since(instant::SystemTime::UNIX_EPOCH)
11        .expect("time went backwards")
12}