Choreonoid  1.5
Sleep.h
Go to the documentation of this file.
1 
2 #ifndef CNOID_UTIL_SLEEP_H
3 #define CNOID_UTIL_SLEEP_H
4 
5 #ifdef WIN32
6 #include <windows.h>
7 
8 namespace cnoid {
9 
10 inline void msleep(int msec){
11  ::Sleep(msec);
12 }
13 inline void usleep(int usec){
14  ::Sleep(usec / 1000);
15 }
16 
17 }
18 
19 #else
20 
21 #include <unistd.h>
22 
23 namespace cnoid {
24 
25 inline void msleep(int msec){
26  ::usleep(msec * 1000);
27 }
28 inline void usleep(int usec){
29  ::usleep(usec);
30 }
31 
32 }
33 
34 #endif
35 
36 #endif
void usleep(int usec)
Definition: Sleep.h:28
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
void msleep(int msec)
Definition: Sleep.h:25