-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdate.hpp
More file actions
44 lines (38 loc) · 798 Bytes
/
date.hpp
File metadata and controls
44 lines (38 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include <cstdint>
namespace date {
/**
* Set the current day as days after January 1, 1984
*
* @param day days after 1984-1-1
*/
void set_day(uint32_t day);
/**
* Set the current time of day as milliseconds after midnight
*
* @param time ms after midnight
*/
void set_time(uint32_t time);
/**
* Get the current day as days after January 1, 1984.
*
* This will automatically update with millis()
*
* @return days after 1984-1-1
*/
uint32_t get_day();
/**
* Get the current time of day as milliseconds after midnight
*
* This will automatically update with millis()
*
* @return ms after midnight
*/
uint32_t get_time();
/**
* Get the number of seconds the device has been online
*
* @return seconds after boot
*/
uint32_t get_uptime();
} // namespace date