Represents a span of time, providing utility functions for calculating days, hours, minutes, and seconds.
More...
#include <ssgx_utils_t_time.h>
Represents a span of time, providing utility functions for calculating days, hours, minutes, and seconds.
◆ TimeSpan() [1/3]
| ssgx::utils_t::TimeSpan::TimeSpan |
( |
| ) |
|
|
noexcept |
Default constructor, initializes the time span to 0.
◆ TimeSpan() [2/3]
| ssgx::utils_t::TimeSpan::TimeSpan |
( |
time_t | span | ) |
|
|
explicitnoexcept |
Constructs a TimeSpan from a given time span in seconds.
- Parameters
-
| span | Time span in seconds. |
◆ TimeSpan() [3/3]
| ssgx::utils_t::TimeSpan::TimeSpan |
( |
int64_t | num_days, |
|
|
int | num_hours, |
|
|
int | num_mins, |
|
|
int | num_secs ) |
|
noexcept |
Constructs a TimeSpan from days, hours, minutes, and seconds.
- Parameters
-
| num_days | Number of days. |
| num_hours | Number of hours. |
| num_mins | Number of minutes. |
| num_secs | Number of seconds. |
◆ GetDays()
| int64_t ssgx::utils_t::TimeSpan::GetDays |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the number of days in the time span.
- Returns
- Number of days.
◆ GetHours()
| int64_t ssgx::utils_t::TimeSpan::GetHours |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the remaining hours after extracting days.
- Returns
- Number of hours.
◆ GetMinutes()
| int64_t ssgx::utils_t::TimeSpan::GetMinutes |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the remaining minutes after extracting hours.
- Returns
- Number of minutes.
◆ GetSeconds()
| int64_t ssgx::utils_t::TimeSpan::GetSeconds |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the remaining seconds after extracting minutes.
- Returns
- Number of seconds.
◆ GetTimeSpan()
| time_t ssgx::utils_t::TimeSpan::GetTimeSpan |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the total time span in seconds.
- Returns
- Total time span in seconds.
◆ GetTotalHours()
| int64_t ssgx::utils_t::TimeSpan::GetTotalHours |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the total number of hours in the time span.
- Returns
- Total number of hours.
◆ GetTotalMinutes()
| int64_t ssgx::utils_t::TimeSpan::GetTotalMinutes |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the total number of minutes in the time span.
- Returns
- Total number of minutes.
◆ GetTotalSeconds()
| int64_t ssgx::utils_t::TimeSpan::GetTotalSeconds |
( |
| ) |
const |
|
nodiscardnoexcept |
Returns the total number of seconds in the time span.
- Returns
- Total number of seconds.
◆ operator!=()
| bool ssgx::utils_t::TimeSpan::operator!= |
( |
TimeSpan | span | ) |
const |
|
noexcept |
◆ operator+()
◆ operator+=()
◆ operator-()
◆ operator-=()
◆ operator<()
| bool ssgx::utils_t::TimeSpan::operator< |
( |
TimeSpan | span | ) |
const |
|
noexcept |
◆ operator<=()
| bool ssgx::utils_t::TimeSpan::operator<= |
( |
TimeSpan | span | ) |
const |
|
noexcept |
◆ operator==()
| bool ssgx::utils_t::TimeSpan::operator== |
( |
TimeSpan | span | ) |
const |
|
noexcept |
◆ operator>()
| bool ssgx::utils_t::TimeSpan::operator> |
( |
TimeSpan | span | ) |
const |
|
noexcept |
◆ operator>=()
| bool ssgx::utils_t::TimeSpan::operator>= |
( |
TimeSpan | span | ) |
const |
|
noexcept |
The documentation for this class was generated from the following file: