#include <health_monitor_util.h>
|
| static std::string | format_percent (const std::string &percent_str) |
| |
| static std::string | format_percent (double percent) |
| |
| static std::string | format_ms (const std::string &ms_str, bool units=true) |
| |
| static std::string | format_ms (uint64_t ms, bool units=true) |
| |
| static std::string | format_ms_str (const std::string &str) |
| |
| static std::string | format_ms_str_value (const std::string &str) |
| |
| static std::string | format_time (time_t time_value) |
| | Format time - Convert seconds to YYYY-MM-DD HH:MM:SS. More...
|
| |
| static std::string | format_time (const struct timeval &tv) |
| | Format time - Convert microseconds to seconds. More...
|
| |
| static std::string | format_time (const std::string &tv_str) |
| | Format time - Convert string of microsends to seconds. More...
|
| |
| static std::string | format_time_str (const std::string str) |
| |
| static std::string | format_horizon (int32_t minutes, bool verbose=false) |
| | Format the horizon window for external use. More...
|
| |
◆ fmt()
◆ format_horizon()
| std::string hm::fmt::format_horizon |
( |
int32_t |
minutes, |
|
|
bool |
verbose = false |
|
) |
| |
|
static |
Format the horizon window for external use.
- Parameters
-
| minutes | The forecast horizon in minutes. |
| verbose | True for long format, false for compact format |
- Returns
- Verbose: 30 min, 1 hour, 2 days, ... Compact: 60m, 24h, 48h, 72h, 4.5d, 7.0d, 30d, ...
◆ format_ms() [1/2]
| std::string hm::fmt::format_ms |
( |
const std::string & |
ms_str, |
|
|
bool |
units = true |
|
) |
| |
|
static |
◆ format_ms() [2/2]
| std::string hm::fmt::format_ms |
( |
uint64_t |
ms, |
|
|
bool |
units = true |
|
) |
| |
|
static |
◆ format_ms_str()
| static std::string hm::fmt::format_ms_str |
( |
const std::string & |
str | ) |
|
|
inlinestatic |
◆ format_ms_str_value()
| static std::string hm::fmt::format_ms_str_value |
( |
const std::string & |
str | ) |
|
|
inlinestatic |
◆ format_percent() [1/2]
| std::string hm::fmt::format_percent |
( |
const std::string & |
percent_str | ) |
|
|
static |
◆ format_percent() [2/2]
| std::string hm::fmt::format_percent |
( |
double |
percent | ) |
|
|
static |
◆ format_time() [1/3]
| std::string hm::fmt::format_time |
( |
const std::string & |
tv_str | ) |
|
|
static |
Format time - Convert string of microsends to seconds.
- Parameters
-
| tv_str | String with time value as 'sec.usec' |
- Returns
- Formatted time string
◆ format_time() [2/3]
| std::string hm::fmt::format_time |
( |
const struct timeval & |
tv | ) |
|
|
static |
Format time - Convert microseconds to seconds.
- Parameters
-
| tv | Structured time value in microseconds, i.e. from gettimeofday() |
- Returns
- Formatted time string
◆ format_time() [3/3]
| std::string hm::fmt::format_time |
( |
time_t |
time_value | ) |
|
|
static |
Format time - Convert seconds to YYYY-MM-DD HH:MM:SS.
- Parameters
-
| time_value | Numeric time value in seconds, e.g. from time() |
- Returns
- Formatted time string
◆ format_time_str()
| static std::string hm::fmt::format_time_str |
( |
const std::string |
str | ) |
|
|
inlinestatic |
The documentation for this class was generated from the following files: