Robotran C Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
time_functions.h
Go to the documentation of this file.
1 
8 #ifndef _TIME_FUNCTIONS_H_
9 #define _TIME_FUNCTIONS_H_
10 
11 #include <stdlib.h>
12 
13 #ifdef _WIN32
14 #include <time.h>
15 #include <sys/timeb.h>
16 
17 #if !defined(MINGW)
18 #include "winsock.h"
19 #endif
20 
21 //typedef struct mbs_timeval {
22  //long tv_sec;
23  //long tv_usec;
24 //} mbs_timeval;
25 
26 #else
27 #include <sys/time.h>
28 #endif
29 
30 // prototypes
31 void time_get(int *t_sec, int *t_usec);
32 int t_usec(int init_t_sec, int init_t_usec);
33 
34 #ifdef _WIN32
35 int gettimeofday (struct timeval *tp, void *tz);
36 #endif
37 
38 #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:24
time_get
void time_get(int *t_sec, int *t_usec)
return the absolute time of the computer
Definition: time_functions.c:10
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:24
time_get
void time_get(int *t_sec, int *t_usec)
return the absolute time of the computer
Definition: time_functions.c:10