OpenRTM
1.0.0
Main Page
Namespaces
Classes
Files
File List
File Members
tmp
binarydeb
ros-indigo-openrtm-aist-1.1.0
src
lib
coil
include
coil
Time.h
Go to the documentation of this file.
1
// -*- C++ -*-
19
#ifndef COIL_TIME_H
20
#define COIL_TIME_H
21
22
#include <unistd.h>
23
#include <sys/time.h>
24
#include <sys/types.h>
25
#include <time.h>
26
#include <iostream>
27
#include <
coil/config_coil.h
>
28
#include <
coil/TimeValue.h
>
29
30
namespace
coil
31
{
32
54
inline
unsigned
int
sleep
(
unsigned
int
seconds)
55
{
56
return ::sleep
(seconds);
57
}
58
80
inline
int
sleep
(
TimeValue
interval)
81
{
82
timeval tv;
83
tv.tv_sec = interval.
sec
();
84
tv.tv_usec = interval.
usec
();
85
return ::select(0, 0, 0, 0, &tv);
86
}
87
109
inline
int
usleep
(useconds_t usec)
110
{
111
return ::usleep
(usec);
112
}
113
137
inline
int
gettimeofday
(
struct
timeval *tv,
struct
timezone *tz)
138
{
139
return ::gettimeofday
(tv, tz);
140
}
141
159
inline
TimeValue
gettimeofday
()
160
{
161
timeval tv;
162
::gettimeofday
(&tv, 0);
163
return
TimeValue
(tv.tv_sec, tv.tv_usec);
164
}
165
189
inline
int
settimeofday
(
const
struct
timeval *tv ,
const
struct
timezone *tz)
190
{
191
return ::settimeofday
(tv, tz);
192
}
193
194
195
};
196
197
#endif // COIL_TIME_H
Generated on Mon Mar 13 2017 01:58:13 for OpenRTM by
1.8.4