timeval.h File Reference

Utility functions for handling timeval calculations. More...

Go to the source code of this file.

Functions

timeval * pa_gettimeofday (struct timeval *tv)
 Return the current timestamp, just like UNIX gettimeofday().
pa_usec_t pa_timeval_diff (const struct timeval *a, const struct timeval *b)
 Calculate the difference between the two specified timeval structs.
int pa_timeval_cmp (const struct timeval *a, const struct timeval *b)
 Compare the two timeval structs and return 0 when equal, negative when a < b, positive otherwse.
pa_usec_t pa_timeval_age (const struct timeval *tv)
 Return the time difference between now and the specified timestamp.
timeval * pa_timeval_add (struct timeval *tv, pa_usec_t v)
 Add the specified time inmicroseconds to the specified timeval structure.


Detailed Description

Utility functions for handling timeval calculations.


Function Documentation

struct timeval* pa_gettimeofday ( struct timeval *  tv  ) 

Return the current timestamp, just like UNIX gettimeofday().

Examples:
pacat.c.

struct timeval* pa_timeval_add ( struct timeval *  tv,
pa_usec_t  v 
)

Add the specified time inmicroseconds to the specified timeval structure.

Examples:
pacat.c.

pa_usec_t pa_timeval_age ( const struct timeval *  tv  ) 

Return the time difference between now and the specified timestamp.

int pa_timeval_cmp ( const struct timeval *  a,
const struct timeval *  b 
)

Compare the two timeval structs and return 0 when equal, negative when a < b, positive otherwse.

pa_usec_t pa_timeval_diff ( const struct timeval *  a,
const struct timeval *  b 
)

Calculate the difference between the two specified timeval structs.


Generated on Wed May 30 19:36:31 2007 for PulseAudio by  doxygen 1.5.1