Introduce ExecutionTimeSubject

This commit is contained in:
2025-05-26 15:32:36 +02:00
parent 06e9348016
commit 85bc6e9eba
14 changed files with 131 additions and 40 deletions

View File

@ -21,18 +21,18 @@ public class WatchdogTimer extends PICComponent implements WatchdogTimerInterfac
if (enabled) {
if (realtimer >= (watchdogTime + lastReset - 1)) {
dataRegister.clearBit(3, 4);
lastReset = commands.getTotalExecutionTime();
lastReset = executionTime.getTotalExecutionTime();
frontendController.stopRunFromBackend("Watchdog Timer");
}
else {
rawtimer++;
realtimer = (long) (rawtimer * commands.getExecutionTimeMultiplier());
realtimer = (long) (rawtimer * executionTime.getExecutionTimeMultiplier());
}
}
}
public void reset (){
lastReset = commands.getTotalExecutionTime();
lastReset = executionTime.getTotalExecutionTime();
rawtimer = 0;
realtimer = 0;
preScaler.reset();