source/gjAPI.cpp
void gjAPI::UtilSleep(const unsigned int iMs)
{
#if defined(_GJ_WINDOWS_)

    Sleep(iMs);

#else

    struct timespec oReq;

    oReq.tv_sec  = (iMs / 1000);
    oReq.tv_nsec = (iMs % 1000) * 1000000;

    nanosleep(&oReq, NULL);

#endif
}
// ****************************************************************
/* wait a specific amount of time */
wait a specific amount of time
wait a specific amount of time
void gjAPI::UtilSleep(const unsigned int iMs)
{
#if defined(_GJ_WINDOWS_)
    Sleep(iMs);
#else
    struct timespec oReq;
    oReq.tv_sec  = (iMs / 1000);
    oReq.tv_nsec = (iMs % 1000) * 1000000;
    nanosleep(&oReq, NULL);
#endif
}
void gjAPI :: UtilSleep ( const unsigned int iMs ) { #if defined ( _GJ_WINDOWS_ ) Sleep ( iMs ) ; #else struct timespec oReq ; oReq . tv_sec = ( iMs / 1000 ) ; oReq . tv_nsec = ( iMs % 1000 ) * 1000000 ; nanosleep ( & oReq , NULL ) ; #endif }
wait a specific amount of time
wait a specific amount of time