Strophe  0.8
XMPP client library
Functions
util.h File Reference

Internally used utility functions. More...

Functions

uint64_t time_stamp (void)
 Return an integer based time stamp.
uint64_t time_elapsed (uint64_t t1, uint64_t t2)
 Get the time elapsed between two time stamps.

Detailed Description

Internally used utility functions.


Function Documentation

uint64_t time_stamp ( void  )

Return an integer based time stamp.

This function uses gettimeofday or timeGetTime (on Win32 platforms) to compute an integer based time stamp. This is used internally by the event loop and timed handlers.

Returns:
an integer time stamp
uint64_t time_elapsed ( uint64_t  t1,
uint64_t  t2 
)

Get the time elapsed between two time stamps.

This function returns the time elapsed between t1 and t2 by subtracting t1 from t2. If t2 happened before t1, the result will be negative. This function is used internally by the event loop and timed handlers.

Parameters:
t1first time stamp
t2second time stamp
Returns:
number of milliseconds between the stamps