2022-08-05 22:05:10 +00:00
|
|
|
| [Home](/trick) → [Documentation Home](../Documentation-Home) → [Simulation Capabilities](Simulation-Capabilities) → Realtime Timer |
|
|
|
|
|------------------------------------------------------------------|
|
2019-11-20 17:04:58 +00:00
|
|
|
|
|
|
|
A realtime sleep timer is an optional class for Trick simulations.
|
|
|
|
|
|
|
|
The Realtime Sleep Timer allows the simulation to sleep in case of an frame underrun.
|
|
|
|
This is desireable to allow other processes to use the CPU during times where the
|
|
|
|
simulation would not be doing anything.
|
|
|
|
|
|
|
|
Trick provides a Sleep Timer based on the system itimer to sleep during
|
|
|
|
simulation inactivity.
|
|
|
|
|
|
|
|
The user has the ability to enable and disable the sleep timer from the input file.
|
|
|
|
|
|
|
|
```
|
|
|
|
trick.itimer_enable()
|
|
|
|
trick.itimer_disable()
|
|
|
|
```
|
|
|
|
|
|
|
|
[Continue to Real-time Injector](Realtime-Injector)
|