A class used to represent an uptime in hours, minutes, seconds and days, with helper functions to convert from time_t and display as a string.
More...
#include <discord.h>
A class used to represent an uptime in hours, minutes, seconds and days, with helper functions to convert from time_t and display as a string.
◆ uptime() [1/2]
dpp::utility::uptime::uptime |
( |
| ) |
|
Construct a new uptime object.
◆ uptime() [2/2]
dpp::utility::uptime::uptime |
( |
time_t |
diff | ) |
|
Construct a new uptime object.
- Parameters
-
diff | A time_t to initialise the object from |
◆ to_msecs()
uint64_t dpp::utility::uptime::to_msecs |
( |
| ) |
|
Get uptime as milliseconds.
- Returns
- uint64_t Uptime as milliseconds
◆ to_secs()
uint64_t dpp::utility::uptime::to_secs |
( |
| ) |
|
Get uptime as seconds.
- Returns
- uint64_t Uptime as seconds
◆ to_string()
std::string dpp::utility::uptime::to_string |
( |
| ) |
|
Get uptime as string.
- Returns
- std::string Uptime as string
◆ days
uint16_t dpp::utility::uptime::days |
◆ hours
uint8_t dpp::utility::uptime::hours |
◆ mins
uint8_t dpp::utility::uptime::mins |
◆ secs
uint8_t dpp::utility::uptime::secs |