Skip to content

Commit ec518e6

Browse files
committed
🎨 Small tweak, ms => now
1 parent 003ce25 commit ec518e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Marlin/src/feature/power.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ bool Power::is_power_needed() {
105105

106106
void Power::check() {
107107
static millis_t nextPowerCheck = 0;
108-
millis_t ms = millis();
109-
if (ELAPSED(ms, nextPowerCheck)) {
110-
nextPowerCheck = ms + 2500UL;
108+
millis_t now = millis();
109+
if (ELAPSED(now, nextPowerCheck)) {
110+
nextPowerCheck = now + 2500UL;
111111
if (is_power_needed())
112112
power_on();
113-
else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
113+
else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))))
114114
power_off();
115115
}
116116
}

0 commit comments

Comments
 (0)