You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by na...@apache.org on 2005/09/28 02:58:50 UTC

svn commit: r292078 - /webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.hpp

Author: nadiramra
Date: Tue Sep 27 17:58:48 2005
New Revision: 292078

URL: http://svn.apache.org/viewcvs?rev=292078&view=rev
Log:
OS/400 does not have ftime on some versions of the OS/400. 
So we emulate ftime via gettimeofday().

Modified:
    webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.hpp

Modified: webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.hpp?rev=292078&r1=292077&r2=292078&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.hpp (original)
+++ webservices/axis/trunk/c/src/platforms/os400/PlatformSpecificOS400.hpp Tue Sep 27 17:58:48 2005
@@ -75,7 +75,6 @@
 // Miscellaneous
 // =============================================================
 #include <sys/time.h>
-#include <sys/timeb.h>
 #include <pthread.h> 
 #include <unistd.h>
 #include <errno.h>
@@ -107,8 +106,24 @@
 /**
  * Platform specific method to obtain current time in milli seconds
  */
-#define PLATFORM_GET_TIME_IN_MILLIS ftime
-#define PLATFORM_TIMEB timeb
+struct os400_timeb                                                               
+{                                                                          
+     long  time;                       
+     long  millitm;                    
+};  
+
+static int os400_ftime(struct os400_timeb * tp)
+{
+    struct timeval t;
+    gettimeofday(&t, NULL);
+    tp->time    = t.tv_sec;
+    tp->millitm = t.tv_usec/1000;
+    return 0;
+}
+                                                                       
+#define PLATFORM_GET_TIME_IN_MILLIS  os400_ftime
+#define PLATFORM_TIMEB os400_timeb
+
 
 /**
  * type to be used for 64bit integers