Update of /cvsroot/boost/boost/libs/thread/src/pthread
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31390
Modified Files:
Tag: thread_rewrite
xtime.cpp
Log Message:
Fallback to time if neither gettimeofday nor clock_gettime available.
Index: xtime.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/pthread/Attic/xtime.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- xtime.cpp 16 Jun 2006 13:40:30 -0000 1.1.2.1
+++ xtime.cpp 17 Jul 2006 10:17:12 -0000 1.1.2.2
@@ -9,8 +9,11 @@
#include <boost/thread/pthread/config.hpp>
#include <boost/thread/pthread/xtime.hpp>
+// TODO: xtime possible should be replaced by boost date time
#if defined(BOOST_HAS_GETTIMEOFDAY)
# include <sys/time.h>
+#elif ! defined (BOOST_HAS_CLOCK_GETTIME)
+# include <time.h>
#endif
namespace boost {
@@ -32,7 +35,11 @@
xtp->nsec = ts.tv_nsec;
return clock_type;
#else
-# error "xtime_get implementation undefined"
+ time_t t;
+ time(&t);
+ xtp->sec = t;
+ xtp->nsec = 0;
+ return clock_type;
#endif
}
return 0;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs