fake_clock_gettime.h File Reference

#include <time.h>

Go to the source code of this file.

Defines

#define CLOCK_REALTIME   0

Functions

int clock_gettime (int clk_id, struct timespec *tp)

Define Documentation

#define CLOCK_REALTIME   0

Definition at line 5 of file fake_clock_gettime.h.

Referenced by logMessage(), and msgSend().


Function Documentation

int clock_gettime ( int  clk_id,
struct timespec *  tp 
)

Definition at line 6 of file fake_clock_gettime.h.

Referenced by logMessage(), and msgSend().

00007 {
00008     /* timespec { tv_sec, tv_nsec } */
00009     /* timeval  { tv_sec; tv_usec } */
00010     int rs;
00011     struct timeval tv;
00012     rs = gettimeofday(&tv, NULL);
00013     tp->tv_sec  = tv.tv_sec;
00014     tp->tv_nsec = tv.tv_usec * 1000;
00015     return rs;
00016 }


Generated on 19 Jan 2018 for loon by  doxygen 1.6.1