Skip to content

Commit 4ef48de

Browse files
committed
simlib: expose simulated clock fields
1 parent f68d2cd commit 4ef48de

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

simln-lib/src/clock.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ impl SimulationClock {
6161
})
6262
}
6363

64+
/// Returns the instant that the simulation clock was started at.
65+
pub fn get_start_instant(&self) -> Instant {
66+
self.start_instant
67+
}
68+
69+
/// Returns the speedup multiplier applied to time.
70+
pub fn get_speedup_multiplier(&self) -> u16 {
71+
self.speedup_multiplier
72+
}
73+
6474
/// Calculates the current simulation time based on the current wall clock time.
6575
///
6676
/// Separated for testing purposes so that we can fix the current wall clock time and elapsed interval.

0 commit comments

Comments
 (0)