wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
SimulationThrottleDisabler Class Reference

RAII guard that disables the visual refresh throttle for the duration of its scope. More...

#include <SimulationThrottleDisabler.h>

Public Member Functions

 SimulationThrottleDisabler (Simulation *simulation)
 Disables the visual refresh throttle on simulation.
 ~SimulationThrottleDisabler ()
 Re-enables the visual refresh throttle.

Detailed Description

RAII guard that disables the visual refresh throttle for the duration of its scope.

The simulation throttle skips phases 3–4 (port-status updates) most ticks as a live-UI performance optimisation. Batch operations like the BeWavedDolphin waveform sweep must read exact output values after every step, so the throttle must not apply.

Example:

{
SimulationThrottleDisabler noThrottle(simulation);
for (int col = 0; col < length; ++col) {
simulation->update(); // always runs all 4 phases
}
} // throttle re-enabled here
SimulationThrottleDisabler(Simulation *simulation)
Disables the visual refresh throttle on simulation.

Definition at line 33 of file SimulationThrottleDisabler.h.

Constructor & Destructor Documentation

◆ SimulationThrottleDisabler()

SimulationThrottleDisabler::SimulationThrottleDisabler ( Simulation * simulation)
explicit

Disables the visual refresh throttle on simulation.

Definition at line 9 of file SimulationThrottleDisabler.cpp.

References qCDebug.

◆ ~SimulationThrottleDisabler()

SimulationThrottleDisabler::~SimulationThrottleDisabler ( )

Re-enables the visual refresh throttle.

Definition at line 16 of file SimulationThrottleDisabler.cpp.

References qCDebug.


The documentation for this class was generated from the following files: