libqb  0.16.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Common Utilities

Author
Angus Salkeld asalk.nosp@m.eld@.nosp@m.redha.nosp@m.t.co.nosp@m.m

These are some convience functions used throughout libqb.

Locking
Time functions
Basic Stopwatch
uint64_t elapsed1;
uint64_t elapsed2;
usleep(sometime);
usleep(somemoretime);
Stopwatch with splits
Setup a stopwatch with space for 3 splits.
uint64_t split;
usleep(sometime);
usleep(somemoretime);
usleep(somemoretime);
do {
split = qb_util_stopwatch_time_split_get(sw, idx, idx);
qb_log(LOG_INFO, "split %d is %"PRIu64"", last, split);
idx--;
} while (split > 0);
qb_log(LOG_INFO, "time between second and third split is %"PRIu64"", split);

See Also
qbutil.h