[Pcsclite-cvs-commit] r2353 - trunk/PCSC/src

Ludovic Rousseau rousseau at alioth.debian.org
Tue Jan 23 11:31:50 CET 2007


Author: rousseau
Date: 2007-01-23 11:31:50 +0100 (Tue, 23 Jan 2007)
New Revision: 2353

Modified:
   trunk/PCSC/src/sys_unix.c
Log:
SYS_USleep(): also work for a duration greater than 1 sec


Modified: trunk/PCSC/src/sys_unix.c
===================================================================
--- trunk/PCSC/src/sys_unix.c	2007-01-23 08:50:31 UTC (rev 2352)
+++ trunk/PCSC/src/sys_unix.c	2007-01-23 10:31:50 UTC (rev 2353)
@@ -100,8 +100,8 @@
 {
 #ifdef HAVE_NANOSLEEP
 	struct timespec mrqtp;
-	mrqtp.tv_sec = 0;
-	mrqtp.tv_nsec = iTimeVal * 1000;
+	mrqtp.tv_sec = iTimeVal/1000000;
+	mrqtp.tv_nsec = (iTimeVal - (mrqtp.tv_sec * 1000000)) * 1000;
 
 	return nanosleep(&mrqtp, NULL);
 #else




More information about the Pcsclite-cvs-commit mailing list