tool::microseconds Struct Reference

Represent an arbitrary number of microseconds. More...

#include <wipal/tool/microseconds.hh>

List of all members.

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)


Detailed Description

Represent an arbitrary number of microseconds.

Constructor & Destructor Documentation

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.

template<class T1 , class T2 >
tool::microseconds::microseconds ( const __gmp_expr< T1, T2 > &  e  )  [inline]

Construct from a GMP expression.


Member Function Documentation

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.

uint32_t tool::microseconds::get_prism_hosttime (  )  const [inline]

Convert the microsecond count into a suitable Prism header host time.

uint32_t tool::microseconds::get_prism_mactime (  )  const [inline]

Convert the microsecond count into a suitable Prism header MAC time.

struct timeval tool::microseconds::get_timeval (  )  const [read]

Convert the microsecond count into a suitable timeval structure.

uint64_t tool::microseconds::get_uint64 (  )  const [inline]

Convert the microsecond count into a 64 bit integer.


The documentation for this struct was generated from the following files:

Generated on Wed Apr 22 22:52:43 2009 for wipal by  doxygen 1.5.8