You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
408 B
23 lines
408 B
2 years ago
|
#ifndef UPTIME_H
|
||
|
#define UPTIME_H
|
||
|
|
||
|
#include <esp8266.h>
|
||
|
|
||
|
extern volatile uint32_t uptime;
|
||
|
|
||
|
/**
|
||
|
* Initialize the virtual timer for uptime counter.
|
||
|
*/
|
||
|
void uptime_timer_init(void);
|
||
|
|
||
|
/**
|
||
|
* Print uptime to a buffer in user-friendly format.
|
||
|
* Should be at least 20 bytes long.
|
||
|
*/
|
||
|
void uptime_str(char *buf);
|
||
|
|
||
|
/** Print uptime to stdout in user-friendly format */
|
||
|
void uptime_print(void);
|
||
|
|
||
|
#endif // UPTIME_H
|