Time

Basic / Standard Reef Angel hardware
Post Reply
clw143
Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana

Time

Post 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?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Time

Post 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
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Time

Post by rimai »

There is also now(), which gives you UNIX time.
This has a second resolution that you are looking for.
Roberto.
Post Reply