Page 1 of 1

Time

Posted: Sat May 23, 2020 10:16 pm
by clw143
Is there anything predefined for time in seconds that I can use as a variable in code? Trying to simplify some code. Or is there only on hour, on minute, off hour, off minute?

Re: Time

Posted: Sun May 24, 2020 5:45 am
by binder
in short, No.
there is a millis() but it resets at approximately 50 days. (check arduino.cc and look at the reference section).
the main thing is the hour, minute, seconds functions you mentioned.

what are you trying to accomplish?

Sent from my Pixel 2 using Tapatalk

Re: Time

Posted: Sun May 24, 2020 9:11 am
by rimai
There is also now(), which gives you UNIX time.
This has a second resolution that you are looking for.