Skip to Content

Welcome!

This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

This question has been flagged
1 Reply
4021 Views

Dear Industrial Shields team, 


which is the maximum value that the millis() function can hold on a counter? 


Thank you,

Avatar
Discard
Best Answer

Hi there!


Using Millis() function the variable that returns is a 32-bit positive integer (uint32_t).

The maximum number available is about 4E + 9 milliseconds = 4E + 6 seconds = 71E + 3 minutes = 1200 hours = 49.7 days.

When this time has elapsed, start again from 0.


You can get more information related with Millis() library at the following link to our blog: 

https://www.industrialshields.com/blog/arduino-industrial-1/post/industrial-arduino-millis-vs-delay-248


Cheers!

Avatar
Discard
Related Posts Replies Views Activity
1
Apr 24
1930
1
Aug 21
2834
1
Jun 20
3583
3
Mar 21
4910
1
Oct 20
3842