Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

int SYS_USleep ( int  iTimeVal)

Makes the current process sleep for some microseconds.

Parameters:
[in]iTimeValNumber of microseconds to sleep.

Definition at line 62 of file sys_unix.c.

Referenced by IFDCloseIFD(), SCardBeginTransaction(), SCardConnect(), SCardDisconnect(), SCardEndTransaction(), SCardGetStatusChange(), SCardReconnect(), SCardStatus(), and SCardTransmit().

{
#ifdef HAVE_NANOSLEEP
      struct timespec mrqtp;
      mrqtp.tv_sec = iTimeVal/1000000;
      mrqtp.tv_nsec = (iTimeVal - (mrqtp.tv_sec * 1000000)) * 1000;

      return nanosleep(&mrqtp, NULL);
#else
      struct timeval tv;
      tv.tv_sec  = iTimeVal/1000000;
      tv.tv_usec = iTimeVal - (tv.tv_sec * 1000000);
      return select(0, NULL, NULL, NULL, &tv);
#endif
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index