eventxx  1.0.1
eventxx::time Struct Reference

Time used for timeout values. More...

Inherits timeval.

Public Member Functions

 time (long sec=0l, long usec=0l) throw ()
 Creates a new time with sec seconds and usec microseconds. More...
 
long sec () const throw ()
 Gets the number of seconds. More...
 
long usec () const throw ()
 Gets the number of microseconds. More...
 
void sec (long s) throw ()
 Sets the number of seconds. More...
 
void usec (long u) throw ()
 Sets the number of microseconds. More...
 

Detailed Description

Time used for timeout values.

This timeout is compose of seconds and microseconds.

Examples
bench.cpp, mixed-way.cpp, and test-time.cpp.

Constructor & Destructor Documentation

◆ time()

eventxx::time::time ( long  sec = 0l,
long  usec = 0l 
)
throw (
)
inline

Creates a new time with sec seconds and usec microseconds.

Parameters
secNumber of seconds.
usecNumber of microseconds.

References sec(), and usec().

Member Function Documentation

◆ sec() [1/2]

long eventxx::time::sec ( ) const
throw (
)
inline

Gets the number of seconds.

Returns
Number of seconds.
Examples
bench.cpp.

Referenced by time().

◆ sec() [2/2]

void eventxx::time::sec ( long  s)
throw (
)
inline

Sets the number of seconds.

Parameters
sNumber of seconds.

◆ usec() [1/2]

long eventxx::time::usec ( ) const
throw (
)
inline

Gets the number of microseconds.

Returns
Number of microseconds.
Examples
bench.cpp, and test-time.cpp.

Referenced by time().

◆ usec() [2/2]

void eventxx::time::usec ( long  u)
throw (
)
inline

Sets the number of microseconds.

Parameters
uNumber of microseconds.

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