rusEFI
The most advanced open source ECU
|
Functions | |
int | time2print (int64_t time) |
uint32_t | getTimeNowLowerNt () |
efitimems_t | getTimeNowMs () |
Returns the 32 bit number of milliseconds since the board initialization. More... | |
efitimesec_t | getTimeNowS () |
Current system time in seconds (32 bits) More... | |
void | setTimeNowUs (int us) |
void | advanceTimeUs (int us) |
void advanceTimeUs | ( | int | us | ) |
uint32_t getTimeNowLowerNt | ( | ) |
Get a monotonically increasing (but wrapping) 32-bit timer value Implemented at port level, based on timer or CPU tick counter Main source of EFI clock, SW-extended to 64bits
2147483648 / ~168MHz = ~12 seconds to overflow
Definition at line 43 of file microsecond_timer_gpt.cpp.
Referenced by getTimeNowNt(), handleShaftSignal(), onLockHook(), onUnlockHook(), portMicrosecondTimerCallback(), and testBinary().
efitimems_t getTimeNowMs | ( | ) |
Returns the 32 bit number of milliseconds since the board initialization.
32 bit return type overflows in 23(or46?) days. tag#4554. I think we do not expect rusEFI to run for 23 days straight days any time soon?
Definition at line 34 of file efitime.cpp.
Referenced by assertTimeIsLinear(), printGpsInfo(), sayHello(), StepperMotorBase::setInitialPosition(), slowStartStopButtonCallback(), testMath(), testRusefiMethods(), testSystemCalls(), updateTriggerWaveformIfNeeded(), and writeSdBlock().
efitimesec_t getTimeNowS | ( | ) |
Current system time in seconds (32 bits)
32 bit integer number of seconds since ECU boot. 31,710 years - would not overflow during our life span.
Definition at line 42 of file efitime.cpp.
Referenced by TriggerDecoderBase::decodeTriggerEvent(), AcController::getAcState(), handleTestCommand(), Engine::periodicSlowCallback(), printRusefiVersion(), sendQcBenchBoardStatus(), THD_FUNCTION(), timeInfo(), updateDevConsoleState(), and updateTunerStudioState().
void setTimeNowUs | ( | int | us | ) |
|
inline |
Definition at line 22 of file efitime.h.
Referenced by InjectorOutputPin::close(), priv::efiPrintfInternal(), fireSparkBySettingPinLow(), TriggerCentral::handleShaftSignal(), InjectorOutputPin::open(), TriggerScheduler::scheduleEventsUntilNextTriggerTooth(), scheduleSparkEvent(), and startDwellByTurningSparkPinHigh().