git-svn-id: svn://db.shs.com.ru/pip@354 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -30,7 +30,13 @@
|
|||||||
//# include <crt_externs.h>
|
//# include <crt_externs.h>
|
||||||
extern clock_serv_t __pi_mac_clock;
|
extern clock_serv_t __pi_mac_clock;
|
||||||
#endif
|
#endif
|
||||||
|
#include <ctime>
|
||||||
|
#ifdef QNX
|
||||||
|
# include <time.h>
|
||||||
|
#endif
|
||||||
|
#ifdef CC_GCC
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*! \class PISystemTime
|
/*! \class PISystemTime
|
||||||
* \brief System time
|
* \brief System time
|
||||||
@@ -502,3 +508,10 @@ PICout operator <<(PICout s, const PIDateTime & v) {
|
|||||||
s.restoreControl();
|
s.restoreControl();
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WINDOWS
|
||||||
|
void msleep(int msecs) {Sleep(msecs);}
|
||||||
|
#else
|
||||||
|
void msleep(int msecs) {usleep(msecs * 1000);}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -23,23 +23,11 @@
|
|||||||
#ifndef PITIME_H
|
#ifndef PITIME_H
|
||||||
#define PITIME_H
|
#define PITIME_H
|
||||||
|
|
||||||
#include <ctime>
|
|
||||||
#include "pistring.h"
|
#include "pistring.h"
|
||||||
#ifdef QNX
|
|
||||||
# include <time.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DOXYGEN
|
|
||||||
//! \brief Sleep for "msecs" milliseconds
|
//! \brief Sleep for "msecs" milliseconds
|
||||||
void msleep(int msecs);
|
void msleep(int msecs);
|
||||||
#else
|
|
||||||
# ifdef WINDOWS
|
|
||||||
inline void msleep(int msecs) {Sleep(msecs);}
|
|
||||||
# else
|
|
||||||
inline void msleep(int msecs) {usleep(msecs * 1000);}
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*! \brief Precise sleep for "usecs" microseconds
|
/*! \brief Precise sleep for "usecs" microseconds
|
||||||
* \details This function consider \c "usleep" offset
|
* \details This function consider \c "usleep" offset
|
||||||
|
|||||||
Reference in New Issue
Block a user