rusEFI
The most advanced open source ECU
|
Functions | |
int | time2print (int64_t time) |
constexpr bool | constexpr_isfinite (float f) |
constexpr bool | _assertFloatFitsInto32BitsAndCast (float value) |
constexpr int32_t | assertFloatFitsInto32BitsAndCast (const char *msg, float value) |
efitick_t | sumTickAndFloat (efitick_t ticks, float extra) |
uint32_t | getTimeNowLowerNt () |
efitimems_t | getTimeNowMs () |
Returns the 32 bit number of milliseconds since the board initialization. | |
efitimesec_t | getTimeNowS () |
Current system time in seconds (32 bits) | |
void | setTimeNowUs (int us) |
void | advanceTimeUs (int us) |
Definition at line 40 of file efitime.h.
Referenced by assertFloatFitsInto32BitsAndCast().
void advanceTimeUs | ( | int | us | ) |
Referenced by configureRusefiLuaHooks(), LuaPid::get(), and LuaIndustrialPid::get().
Definition at line 82 of file efitime.h.
Referenced by PrimeController::onIgnitionStateChanged().
Definition at line 27 of file efitime.h.
Referenced by _assertFloatFitsInto32BitsAndCast().
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(), and portMicrosecondTimerCallback().
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(), testMath(), testRusefiMethods(), testSystemCalls(), updateTriggerWaveformIfNeeded(), and MLG::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 boardSdCardEnable(), configureRusefiLuaUtilHooks(), AdcDevice::getAvgAdcValue(), handleTestCommand(), TriggerDecoderBase::printGaps(), printVersionForConsole(), sendQcBenchBoardStatus(), timeInfo(), updateDevConsoleState(), and updateTunerStudioState().
void setTimeNowUs | ( | int | us | ) |
|
inline |
Definition at line 90 of file efitime.h.
Referenced by PrimeController::onPrimeStart(), scheduleByAngle(), and scheduleSparkEvent().
|
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().