linera_base/time.rs
1// Copyright (c) Zefchain Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4/*!
5Abstractions over time that can be used natively or on the Web.
6 */
7
8cfg_if::cfg_if! {
9 if #[cfg(web)] {
10 // This must remain conditional as otherwise it pulls in JavaScript symbols
11 // on-chain (on any Wasm target).
12 pub use web_time::*;
13 pub use linera_kywasmtime as timer;
14 } else {
15 pub use std::time::*;
16 pub use tokio::time as timer;
17 }
18}