You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by jb...@apache.org on 2005/06/08 17:05:47 UTC

svn commit: r189588 - /xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/PlatformUtils.cpp

Author: jberry
Date: Wed Jun  8 08:05:46 2005
New Revision: 189588

URL: http://svn.apache.org/viewcvs?rev=189588&view=rev
Log:
Revise selection of timer code based on whether the functions, not the headers, exist; prefer gettimeofday over ftime.

Modified:
    xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/PlatformUtils.cpp

Modified: xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/PlatformUtils.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/PlatformUtils.cpp?rev=189588&r1=189587&r2=189588&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/PlatformUtils.cpp (original)
+++ xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/PlatformUtils.cpp Wed Jun  8 08:05:46 2005
@@ -677,15 +677,15 @@
 	unsigned long ms = 0;
 	
 	// *** TODO: additional platform support?
-	#if HAVE_SYS_TIMEB_H
-		timeb aTime;
-		ftime(&aTime);
-		ms = (unsigned long)(aTime.time*1000 + aTime.millitm);
-	#elif   HAVE_SYS_TIME_H
+	#if HAVE_GETTIMEOFDAY
 		struct timeval aTime;
 		gettimeofday(&aTime, NULL);
 		ms = (unsigned long) (aTime.tv_sec * 1000 + aTime.tv_usec / 1000);
-	#else
+	#elif HAVE_FTIME
+		timeb aTime;
+		ftime(&aTime);
+		ms = (unsigned long)(aTime.time*1000 + aTime.millitm);
+	#lse
 		// Make this a warning instead?
 		#error No timing support is configured for this platform. You must configure it.
 	#endif



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org