From 9369beb85b3d65eabfce93b0f0ed59da824b5236 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Apr 2007 13:07:01 +0000 Subject: Everything works with optimization turned on now. --- times.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'times.cc') diff --git a/times.cc b/times.cc index 989bf055..8966d598 100644 --- a/times.cc +++ b/times.cc @@ -2,13 +2,17 @@ namespace ledger { -ptime time_now = boost::posix_time::second_clock::universal_time(); -date date_now = boost::gregorian::day_clock::universal_day(); +#ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK +const ptime time_now = boost::posix_time::microsec_clock::universal_time(); +#else +const ptime time_now = boost::posix_time::second_clock::universal_time(); +#endif +const date date_now = boost::gregorian::day_clock::universal_day(); #ifdef SUPPORT_DATE_AND_TIME -moment_t& now(time_now); +const moment_t& now(time_now); #else -moment_t& now(date_now); +const moment_t& now(date_now); #endif bool day_before_month = false; -- cgit v1.2.3