]> rtime.felk.cvut.cz Git - orte.git/blob - orte/liborte/ORTEMisc.c
New ORTE version 0.3.0 committed
[orte.git] / orte / liborte / ORTEMisc.c
1 /*
2  *  $Id: ORTEMisc.c,v 0.0.0.1           2004/01/27 
3  *
4  *  DEBUG:  section 34                  miscellaneous functions
5  *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
6  *
7  *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
8  *  --------------------------------------------------------------------
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *  
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *  
20  */ 
21  
22 #include "orte_all.h"
23
24 inline void 
25 ORTESleepMs(unsigned int ms) {
26   #if defined(CONFIG_ORTE_UNIX) && defined (HAVE_UNISTD_H)
27     usleep(ms*1000);
28   #elif define CONFIG_ORTE_RTL 
29     usleep(ms*1000);
30   #elif defined CONFIG_ORTE_WIN 
31     Sleep(ms);
32   #elif defined CONFIG_ORTE_RTAI
33     rt_sleep(nano2count(ms*1000000));
34   #elif
35     #error "NOT DEFINED SLEEP FUNCTION!"
36   #endif
37 }