Robotran C Documentation
time_functions.h
Go to the documentation of this file.
1 
7 #ifdef REAL_TIME
8 
9 #ifndef _TIME_FUNCTIONS_H_
10 #define _TIME_FUNCTIONS_H_
11 
12 #include <stdlib.h>
13 
14 #ifdef _WIN32
15 #include <time.h>
16 #include <sys/timeb.h>
17 
18 typedef struct timeval {
19  long tv_sec;
20  long tv_usec;
21 } timeval;
22 
23 #else
24 #include <sys/time.h>
25 #endif
26 
27 // prototypes
28 void time_get(int *t_sec, int *t_usec);
29 int t_usec(int init_t_sec, int init_t_usec);
30 
31 #ifdef _WIN32
32 int gettimeofday (struct timeval *tp, void *tz);
33 #endif
34 
35 #endif
36 #endif
t_usec
int t_usec(int init_t_sec, int init_t_usec)
return the elapsed time (in us) since time 'init_t' (expressed in s and us)
Definition: time_functions.c:25
time_get
void time_get(int *t_sec, int *t_usec)
return the absolute time of the computer
Definition: time_functions.c:11
time_functions.h
functions used to get the time expressed in us (micro seconds)
t_usec
int t_usec(int init_t_sec, int init_t_usec)
return the elapsed time (in us) since time 'init_t' (expressed in s and us)
Definition: time_functions.c:25
time_get
void time_get(int *t_sec, int *t_usec)
return the absolute time of the computer
Definition: time_functions.c:11