Sha256: 7f19f066e32815d540175b61791d8dc97718a368ec51ff24605c9e42d7e2b807

Contents?: true

Size: 357 Bytes

Versions: 15

Compression:

Stored size: 357 Bytes

Contents

#![cfg(feature = "full")]

use tokio::time::{Duration, Instant};

#[tokio::test(start_paused = true)]
async fn test_start_paused() {
    let now = Instant::now();

    // Pause a few times w/ std sleep and ensure `now` stays the same
    for _ in 0..5 {
        std::thread::sleep(Duration::from_millis(1));
        assert_eq!(now, Instant::now());
    }
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
wasmtime-30.0.2 ./ext/cargo-vendor/tokio-1.43.0/tests/rt_time_start_paused.rs
wasmtime-29.0.0 ./ext/cargo-vendor/tokio-1.43.0/tests/rt_time_start_paused.rs
wasmtime-28.0.0 ./ext/cargo-vendor/tokio-1.43.0/tests/rt_time_start_paused.rs
wasmtime-27.0.0 ./ext/cargo-vendor/tokio-1.41.1/tests/rt_time_start_paused.rs
wasmtime-26.0.0 ./ext/cargo-vendor/tokio-1.41.0/tests/rt_time_start_paused.rs
wasmtime-25.0.2 ./ext/cargo-vendor/tokio-1.40.0/tests/rt_time_start_paused.rs
wasmtime-25.0.1 ./ext/cargo-vendor/tokio-1.39.3/tests/rt_time_start_paused.rs
wasmtime-25.0.0 ./ext/cargo-vendor/tokio-1.39.3/tests/rt_time_start_paused.rs
wasmtime-24.0.0 ./ext/cargo-vendor/tokio-1.39.3/tests/rt_time_start_paused.rs
wasmtime-23.0.2 ./ext/cargo-vendor/tokio-1.36.0/tests/rt_time_start_paused.rs
wasmtime-22.0.0 ./ext/cargo-vendor/tokio-1.36.0/tests/rt_time_start_paused.rs
wasmtime-21.0.1 ./ext/cargo-vendor/tokio-1.36.0/tests/rt_time_start_paused.rs
wasmtime-20.0.2 ./ext/cargo-vendor/tokio-1.36.0/tests/rt_time_start_paused.rs
wasmtime-20.0.0 ./ext/cargo-vendor/tokio-1.36.0/tests/rt_time_start_paused.rs
wasmtime-18.0.3 ./ext/cargo-vendor/tokio-1.36.0/tests/rt_time_start_paused.rs