Resetting millis()

I should like to propose that the forum adopt the following as the canonical answer to questions about whether or how millis() can be reset.

No, absolutely not, to do so risks catastrophic destruction of the Arduino and probable loss of life and/or limb. Do not under any circumstances try this at home. Instead, save the millis() value in a variable and subtract it ... etc. etc. etc.

Just kidding. I think.

Why are the people who want to reset millis # so adamant? Is copy-then-paste really that difficult?

:stuck_out_tongue_closed_eyes:

# What should they be called? Resetters? Zeroers? Nongooglers? Dead horse beaters (DHBs for short)?

DHB's and Non-googlers aren't specific enough. Perhaps millisillians? :smiley:

homo nonoverflowicus ?

Think those people remember the year 2000 problem too well, they fear the overflow so they want to do anything to prevent an overflow including resetting millis().

I assume they only drink beer (etc) in glasses that are only 3/4 full to prevent overflow,
and there are more things they do to prevent any kind of overflow (you may fill the list).

Why not just tell them:

CLR Rd, Clear Register, Rd ? Rd ? Rd

Umm, which registers are the millis() bytes in? :wink:

I can understand why new people want to reset it. It would be a simple matter if the reference page simply said: "use millis() this way" and showed subtraction.

What exasperates the "issue" are the people who try to be helpful and post code fragments suggesting how to do the reset, most of which aren't correct. This leads the poor new user down the path of failure.

down the path of failure

Some lessons are only learned the hard way (I know from experience :slight_smile:

What should they be called?

Subtraction deniers?

I never have to reset millis. My code fails more often than millis runs out. sigh.

draythomp:
I never have to reset millis. My code fails more often than millis runs out. sigh.

Baha! You are in plenty good company! XD