millis() returns zero

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
perjar
Posts: 45
Joined: 08 Apr 2018 18:02

millis() returns zero

Post by perjar » 17 May 2019 16:34

Dear forum,

I have encountered an issue that I can't quite understand. The issue is that the millis() function sometimes returns 0 instead of the correct timestamp, only to continue to report the correct value in the next call.

Over-simplified code for illustrational purposes:

Code: Select all

loop {
   currenttime = millis();
   Serial.println(currenttime);
   delay(2000);
}
This can give a printout as follows:

Code: Select all

>341020
>343021
>345021
>0
>349023
I am on 2.1.4.

Any ideas?

User avatar
PoltoS
Posts: 4637
Joined: 26 Jan 2011 19:36

Re: millis() returns zero

Post by PoltoS » 19 May 2019 19:23

Could you please try it in 2.1.5?

Post Reply