simulon/
lib.rs

1//! Simulon is a lite discrete event simulation engine used for simulating latency sensitive IO
2//! bound applications. It provides a small set of API that can be used inside of a simulation
3//! to interact with other nodes in the same simulation, and perform basic IO.
4
5use std::time::Duration;
6
7/// The api to use inside the simulation executor.
8pub mod api;
9
10/// The types and implementations around the latency data provider.
11pub mod latency;
12
13/// The types used for generating reports after a simulation.
14pub mod report;
15
16/// The simulator engine.
17pub mod simulation;
18
19mod future;
20mod message;
21mod state;
22mod storage;
23
24/// How many frames is one millisecond?
25pub const FRAME_TO_MS: u64 = 4;
26
27/// The duration of one frame.
28pub const FRAME_DURATION: Duration = Duration::from_micros(1_000 / FRAME_TO_MS);