Time

Basic / Standard Reef Angel hardware

Posts: 106
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Sat May 23, 2020 10:16 pm
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?
User avatar
Posts: 2812
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sun May 24, 2020 5:45 am
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

Posts: 12643
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun May 24, 2020 9:11 am
There is also now(), which gives you UNIX time.
This has a second resolution that you are looking for.
Roberto.

Return to Standard

Who is online

Users browsing this forum: No registered users and 4 guests