MCPcopy Create free account
hub / github.com/aws/clock-bound / main

Function main

test/vmclock/src/main.rs:17–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16#[tokio::main(flavor = "current_thread")]
17async fn main() {
18 tracing_subscriber::fmt()
19 .with_env_filter(EnvFilter::from_default_env())
20 .init();
21
22 let daemon_info = DaemonInfo {
23 major_version: 2,
24 minor_version: 100,
25 startup_id: rng().next_u64(),
26 };
27
28 let selected_clock = Arc::new(SelectedClockSource::default());
29 let mut sourceio = SourceIO::construct(selected_clock.clone(), daemon_info);
30
31 println!("Attempting to create vmclock runner using {VMCLOCK_SHM_DEFAULT_PATH:?} file.");
32 sourceio.create_vmclock(VMCLOCK_SHM_DEFAULT_PATH).await;
33 sourceio.spawn_all();
34
35 // Allow the runner to poll the shared memory file for a while.
36 tokio::time::sleep(Duration::from_secs(3)).await;
37
38 println!("VMClock running initiation and polling test PASSED.");
39}

Callers

nothing calls this directly

Calls 3

create_vmclockMethod · 0.80
spawn_allMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected