#include <wipal/tool/microseconds.hh>
Public Types | |
typedef mpz_class | mpz_type |
Public Member Functions | |
microseconds (const uint64_t) | |
microseconds (const struct timeval &tv) | |
uint32_t | get_prism_mactime () const |
uint32_t | get_prism_hosttime () const |
uint64_t | get_uint64 () const |
unsigned | get_div_by (unsigned d) const |
struct timeval | get_timeval () const |
Interaction with GMP | |
microseconds (const mpz_type &) | |
template<class T1, class T2> | |
microseconds (const __gmp_expr< T1, T2 > &e) |
tool::microseconds::microseconds | ( | const uint64_t | i | ) | [inline] |
Construct from a 64-bit unsigned integer.
tool::microseconds::microseconds | ( | const struct timeval & | tv | ) | [inline] |
Construct from a timeval
struct.
tool::microseconds::microseconds | ( | const mpz_type & | z | ) | [inline] |
Construct from a GMP bignum.
tool::microseconds::microseconds | ( | const __gmp_expr< T1, T2 > & | e | ) | [inline] |
Construct from a GMP expression.
uint32_t tool::microseconds::get_prism_mactime | ( | ) | const [inline] |
Convert the microsecond count into a suitable Prism header MAC time.
uint32_t tool::microseconds::get_prism_hosttime | ( | ) | const [inline] |
Convert the microsecond count into a suitable Prism header host time.
uint64_t tool::microseconds::get_uint64 | ( | ) | const [inline] |
Convert the microsecond count into a 64 bit integer.
unsigned tool::microseconds::get_div_by | ( | unsigned | d | ) | const [inline] |
Divide the microsecond count by d
and return the result.
A negative microsecond count or a result that does not fit into an unsigned long yields undefined behavior.
struct timeval tool::microseconds::get_timeval | ( | ) | const [read] |
Convert the microsecond count into a suitable timeval
structure.