#include <Millisecond.hpp>
◆ type_t
◆ Millisecond() [1/5]
anna::Millisecond::Millisecond |
( |
| ) |
|
|
inline |
◆ Millisecond() [2/5]
anna::Millisecond::Millisecond |
( |
const type_t |
value | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
value | Valor inicial de esta instancia. |
◆ Millisecond() [3/5]
anna::Millisecond::Millisecond |
( |
const Millisecond & |
other | ) |
|
|
inline |
Constructor copia.
- Parameters
-
other | Instancia de la que copiar. |
43 : a_value(other.a_value) {;}
◆ Millisecond() [4/5]
anna::Millisecond::Millisecond |
( |
const Second & |
other | ) |
|
Constructor copia.
- Parameters
-
other | Instancia de la que copiar. |
◆ Millisecond() [5/5]
anna::Millisecond::Millisecond |
( |
const Microsecond & |
other | ) |
|
Constructor copia.
- Parameters
-
other | Instancia de la que copiar. |
◆ asString()
std::string anna::Millisecond::asString |
( |
| ) |
const |
Devuelve una cadena con el valor de esta instancia y las unidades "ms".
- Returns
- una cadena con el valor de esta instancia y las unidades "ms".
◆ fromString()
static Millisecond anna::Millisecond::fromString |
( |
const std::string & |
value | ) |
|
|
staticnoexcept |
Obtiene los microsegundos del valor contenido en la cadena recibida como parámetro.
- Parameters
-
value | Cadena que contiene los microsegundos habrá sido obtenida con asString. |
- Returns
- los microsegundos del valor contenido en la cadena recibida como parámetro.
◆ getTime()
Devuelve la hora actual de sistema expresada en milisegundos transcurridos desde el 1 de Enero de 1970
- Returns
- la hora actual de sistema expresada en milisegundos transcurridos desde el 1 de Enero de 1970
◆ getTimeVal()
timeval* anna::Millisecond::getTimeVal |
( |
timeval & |
tv | ) |
const |
Si el valor de esta instancia es positivo devuelve el valor asociado a esta instancia en una estructura de time timeval usada habitualmente para temporizar operaciones a nivel de SO, en otro caso retorna NULL.
- Parameters
-
tv | Instancia sobre la que guardar el valor en caso de que se éste tenga un valor positivo. |
- Returns
- Si el valor de esta instancia es positivo devuelve el valor asociado a esta instancia en una estructura de time timeval usada habitualmente para temporizar operaciones a nivel de SO, en otro caso retorna NULL.
◆ getValue()
type_t anna::Millisecond::getValue |
( |
| ) |
const |
|
inline |
Devuelve el valor asociado a esta instancia.
- Returns
- el valor asociado a esta instancia.
◆ operator type_t()
anna::Millisecond::operator type_t |
( |
| ) |
const |
|
inline |
Conversor a numérico.
- Returns
- El valor asociado a esta instancia.
◆ operator!=() [1/3]
bool anna::Millisecond::operator!= |
( |
const Millisecond & |
other | ) |
const |
|
inline |
82 {
return a_value != other.a_value; }
◆ operator!=() [2/3]
bool anna::Millisecond::operator!= |
( |
const Second & |
other | ) |
const |
◆ operator!=() [3/3]
bool anna::Millisecond::operator!= |
( |
const Microsecond & |
other | ) |
const |
◆ operator+=()
112 { a_value += other.a_value;
return *
this; }
◆ operator-=()
114 {(a_value > other.a_value) ? (a_value -= other.a_value) : (a_value = 0);
return *
this; }
◆ operator<() [1/3]
bool anna::Millisecond::operator< |
( |
const Millisecond & |
other | ) |
const |
|
inline |
94 {
return a_value < other.a_value; }
◆ operator<() [2/3]
bool anna::Millisecond::operator< |
( |
const Second & |
other | ) |
const |
◆ operator<() [3/3]
bool anna::Millisecond::operator< |
( |
const Microsecond & |
other | ) |
const |
◆ operator<=() [1/3]
bool anna::Millisecond::operator<= |
( |
const Millisecond & |
other | ) |
const |
|
inline |
106 {
return a_value <= other.a_value; }
◆ operator<=() [2/3]
bool anna::Millisecond::operator<= |
( |
const Second & |
other | ) |
const |
|
inline |
108 {
return (
operator==(other) ==
true) ? true :
operator<(other); }
bool operator<(const Millisecond &other) const
Definition: Millisecond.hpp:94
◆ operator<=() [3/3]
bool anna::Millisecond::operator<= |
( |
const Microsecond & |
other | ) |
const |
|
inline |
110 {
return (
operator==(other) ==
true) ? true :
operator<(other); }
bool operator<(const Millisecond &other) const
Definition: Millisecond.hpp:94
◆ operator=() [1/4]
68 { a_value = other;
return *
this; }
◆ operator=() [2/4]
70 { a_value = other.a_value;
return *
this; }
◆ operator=() [3/4]
◆ operator=() [4/4]
◆ operator==() [1/3]
bool anna::Millisecond::operator== |
( |
const Millisecond & |
other | ) |
const |
|
inline |
76 {
return a_value == other.a_value; }
◆ operator==() [2/3]
bool anna::Millisecond::operator== |
( |
const Second & |
other | ) |
const |
◆ operator==() [3/3]
bool anna::Millisecond::operator== |
( |
const Microsecond & |
other | ) |
const |
◆ operator>() [1/3]
bool anna::Millisecond::operator> |
( |
const Millisecond & |
other | ) |
const |
|
inline |
88 {
return a_value > other.a_value; }
◆ operator>() [2/3]
bool anna::Millisecond::operator> |
( |
const Second & |
other | ) |
const |
◆ operator>() [3/3]
bool anna::Millisecond::operator> |
( |
const Microsecond & |
other | ) |
const |
◆ operator>=() [1/3]
bool anna::Millisecond::operator>= |
( |
const Millisecond & |
other | ) |
const |
|
inline |
100 {
return a_value >= other.a_value; }
◆ operator>=() [2/3]
bool anna::Millisecond::operator>= |
( |
const Second & |
other | ) |
const |
|
inline |
102 {
return (
operator==(other) ==
true) ? true :
operator>(other); }
bool operator>(const Millisecond &other) const
Definition: Millisecond.hpp:88
◆ operator>=() [3/3]
bool anna::Millisecond::operator>= |
( |
const Microsecond & |
other | ) |
const |
|
inline |
104 {
return (
operator==(other) ==
true) ? true :
operator>(other); }
bool operator>(const Millisecond &other) const
Definition: Millisecond.hpp:88
◆ refValue()
type_t& anna::Millisecond::refValue |
( |
| ) |
|
|
inline |
◆ Microsecond
◆ operator*
Millisecond()
Definition: Millisecond.hpp:31
◆ operator+
Millisecond()
Definition: Millisecond.hpp:31
◆ operator-
Millisecond()
Definition: Millisecond.hpp:31
◆ operator/ [1/3]
Millisecond()
Definition: Millisecond.hpp:31
◆ operator/ [2/3]
Millisecond()
Definition: Millisecond.hpp:31
◆ operator/ [3/3]
Millisecond()
Definition: Millisecond.hpp:31
◆ Second
The documentation for this class was generated from the following file: