diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-27 13:07:01 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:32 -0400 |
commit | 9369beb85b3d65eabfce93b0f0ed59da824b5236 (patch) | |
tree | e9323e8ec55ca22ad489435fa9d1630a5a8dad11 /times.cc | |
parent | 771f39b69acbc78d5672e7cb95030260866eb33d (diff) | |
download | fork-ledger-9369beb85b3d65eabfce93b0f0ed59da824b5236.tar.gz fork-ledger-9369beb85b3d65eabfce93b0f0ed59da824b5236.tar.bz2 fork-ledger-9369beb85b3d65eabfce93b0f0ed59da824b5236.zip |
Everything works with optimization turned on now.
Diffstat (limited to 'times.cc')
-rw-r--r-- | times.cc | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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; |