]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/date_time/test/posix_time/testclock.cpp
1 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
2 * Use, modification and distribution is subject to the
3 * Boost Software License, Version 1.0. (See accompanying
4 * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
8 #include <boost/config.hpp>
9 #include "boost/date_time/posix_time/posix_time.hpp"
16 using namespace boost::posix_time
;
17 ptime tl
= second_clock::local_time();
18 std::cout
<< tl
<< std::endl
;
20 ptime tu
= second_clock::universal_time();
21 std::cout
<< tu
<< std::endl
;
23 #if !defined(BOOST_WINDOWS) && defined(_POSIX_TIMERS)
24 for (int i
=0; i
< 3; ++i
) {
25 ptime t2
= second_clock::local_time();
26 std::cout
<< t2
<< std::endl
;
31 #ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK
32 for (int i
=0; i
< 10; ++i
) {
33 //ptime t2 = high_precision_clock::local_time();
34 ptime t2
= microsec_clock::local_time();
35 std::cout
<< t2
<< std::endl
;
37 #endif // BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK