Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
postime.h File Reference

Posadis time functions. More...

#include <pthread.h>
#include "types.h"
+ Include dependency graph for postime.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  postime_t
 Time with millisecond precision. More...


postime_t getcurtime ()
 get the current time
timespec postimespec (int timeout)
 timespec for given millisecond timeout

Detailed Description

Posadis time functions.

The functions in this source file, as well as the postime_t class defined here, provide easy access to times in a system-independent way.

Function Documentation

postime_t getcurtime ( )

get the current time

Retrieves the current time with millisecond precision and stores it in a postime_t structure.

The current time
timespec postimespec ( int  timeout)

timespec for given millisecond timeout

Returns a timespec structure that can be used, among other things, for the pthread_cond_timedwait function (which is what it was designed for).

timeoutNumber of milliseconds from now the timespec is set to
A timespec structure containing an absolute time.