Boost logo

Boost :

From: David Deakins (ddeakins_at_[hidden])
Date: 2007-11-01 23:13:18


Just a small patch for the date_time library. WinCE does not supply the
  GetSystemTimeAsFileTime Win32 method. It does however supply the
individual GetSystemTime and SystemTimeToFileTime methods. The config
headers already define BOOST_NO_GETSYSTEMTIMEASFILETIME to flag this
situation and the patch uses this define to mark when the alternate
function calls should be substituted.

Thanks,
-Dave

Index: microsec_time_clock.hpp
===================================================================
--- microsec_time_clock.hpp (revision 40672)
+++ microsec_time_clock.hpp (working copy)
@@ -120,6 +120,10 @@
       FILETIME ft_utc;
       GetSystemTimeAsFileTime(&ft_utc);
       FileTimeToLocalFileTime(&ft_utc,&ft);
+ #elif defined(BOOST_NO_GETSYSTEMTIMEASFILETIME)
+ SYSTEMTIME st;
+ GetSystemTime( &st );
+ SystemTimeToFileTime( &st, &ft );
       #else
       GetSystemTimeAsFileTime(&ft);
       #endif
@@ -134,6 +138,10 @@
       FILETIME ft_utc;
       GetSystemTimeAsFileTime(&ft_utc);
       FileTimeToLocalFileTime(&ft_utc,&ft);
+ #elif defined(BOOST_NO_GETSYSTEMTIMEASFILETIME)
+ SYSTEMTIME st;
+ GetSystemTime( &st );
+ SystemTimeToFileTime( &st, &ft );
       #else
       GetSystemTimeAsFileTime(&ft);
       #endif


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk