aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/wasm_shims.rs
blob: 088cc9be40f10639d744a60c43438365aec15d71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! FIXME: write short doc here

#[cfg(not(feature = "wasm"))]
pub use std::time::Instant;

#[cfg(feature = "wasm")]
#[derive(Clone, Copy, Debug)]
pub struct Instant;

#[cfg(feature = "wasm")]
impl Instant {
    pub fn now() -> Self {
        Self
    }

    pub fn elapsed(&self) -> std::time::Duration {
        std::time::Duration::new(0, 0)
    }
}