|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66059 - in sandbox/chrono/libs/chrono: build example src test test/clock test/clock/errored test/clock/process test/clock/system test/clock/thread test/duration test/duration/cast
From: vicente.botet_at_[hidden]
Date: 2010-10-17 18:27:08
Author: viboes
Date: 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
New Revision: 66059
URL: http://svn.boost.org/trac/boost/changeset/66059
Log:
Chrono: Cleanup
Text files modified:
sandbox/chrono/libs/chrono/build/Jamfile.v2 | 20 +++---
sandbox/chrono/libs/chrono/example/function_stopclock_example.cpp | 4
sandbox/chrono/libs/chrono/example/io_ex1.cpp | 6
sandbox/chrono/libs/chrono/example/io_ex2.cpp | 2
sandbox/chrono/libs/chrono/example/io_ex3.cpp | 6
sandbox/chrono/libs/chrono/example/io_ex4.cpp | 2
sandbox/chrono/libs/chrono/example/io_ex5.cpp | 2
sandbox/chrono/libs/chrono/example/min_time_point.cpp | 4
sandbox/chrono/libs/chrono/src/process_clock.cpp | 4
sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp | 6
sandbox/chrono/libs/chrono/src/run_timer.cpp | 4
sandbox/chrono/libs/chrono/test/Jamfile.v2 | 103 ++++++++++++++++----------------
sandbox/chrono/libs/chrono/test/chrono_accuracy_test.cpp | 16 ++--
sandbox/chrono/libs/chrono/test/clock/errored/now.pass.cpp | 2
sandbox/chrono/libs/chrono/test/clock/errored_clock.hpp | 14 ++--
sandbox/chrono/libs/chrono/test/clock/process/now.pass.cpp | 8 +-
sandbox/chrono/libs/chrono/test/clock/system/from_time_t.pass.cpp | 2
sandbox/chrono/libs/chrono/test/clock/system/now.pass.cpp | 2
sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp | 2
sandbox/chrono/libs/chrono/test/clock/system/to_time_t.pass.cpp | 2
sandbox/chrono/libs/chrono/test/clock/thread/consistency.pass.cpp | 4
sandbox/chrono/libs/chrono/test/clock/thread/now.pass.cpp | 6
sandbox/chrono/libs/chrono/test/clock_name.cpp | 2
sandbox/chrono/libs/chrono/test/clock_name.hpp | 2
sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp | 2
sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp | 2
sandbox/chrono/libs/chrono/test/explore_limits.cpp | 10 +-
sandbox/chrono/libs/chrono/test/hours.pass.cpp | 2
sandbox/chrono/libs/chrono/test/manipulate_clock_object.cpp | 8 +-
sandbox/chrono/libs/chrono/test/microseconds.pass.cpp | 2
sandbox/chrono/libs/chrono/test/milliseconds.pass.cpp | 2
sandbox/chrono/libs/chrono/test/minutes.pass.cpp | 2
sandbox/chrono/libs/chrono/test/miscellaneous.cpp | 4
sandbox/chrono/libs/chrono/test/nanoseconds.pass.cpp | 2
sandbox/chrono/libs/chrono/test/run_timer_test.cpp | 22 +++---
sandbox/chrono/libs/chrono/test/seconds.pass.cpp | 2
sandbox/chrono/libs/chrono/test/test_clock.cpp | 8 +-
sandbox/chrono/libs/chrono/test/test_duration.cpp | 8 +-
sandbox/chrono/libs/chrono/test/test_special_values.cpp | 4
sandbox/chrono/libs/chrono/test/test_thread_clock.cpp | 2
sandbox/chrono/libs/chrono/test/win32_test.cpp | 124 ++++++++++++++++++++--------------------
41 files changed, 215 insertions(+), 216 deletions(-)
Modified: sandbox/chrono/libs/chrono/build/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/build/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/build/Jamfile.v2 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -18,12 +18,12 @@
project boost/chrono
: source-location ../src
- : requirements
+ : requirements
<os>LINUX:<threading>multi
# uncomment the line above if you build outside the Boost release
- #<include>$(BOOST_ROOT)
+ #<include>$(BOOST_ROOT)
# uncomment the line above if you build outside the Boost release
- #<include>../../..
+ #<include>../../..
<library>/boost/system//boost_system
#<define>BOOST_CHRONO_INLINED
<define>BOOST_USE_WINDOWS_H
@@ -35,14 +35,14 @@
#<define>BOOST_CHRONO_USES_MPL_ASSERT
#<define>BOOST_COMMON_TYPE_USES_ARRAY_ASSERT
#<define>BOOST_RATIO_USES_ARRAY_ASSERT
- #<define>BOOST_CHRONO_USES_ARRAY_ASSERT
+ #<define>BOOST_CHRONO_USES_ARRAY_ASSERT
#<define>BOOST_COMMON_TYPE_DONT_USE_TYPEOF
- <toolset>gcc:<linkflags>--enable-auto-import
+ <toolset>gcc:<linkflags>--enable-auto-import
<warnings>all
<toolset>gcc:<cxxflags>-Wextra
- <toolset>gcc:<cxxflags>-Wno-long-long
+ <toolset>gcc:<cxxflags>-Wno-long-long
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
-
+
: usage-requirements # pass these requirement to dependents (i.e. users)
#<os>LINUX:<threading>multi
<library>/boost/system//boost_system
@@ -58,14 +58,14 @@
#<define>BOOST_COMMON_TYPE_DONT_USE_TYPEOF
<link>shared:<define>BOOST_CHRONO_DYN_LINK=1
<link>static:<define>BOOST_CHRONO_STATIC_LINK=1
- <toolset>gcc:<linkflags>--enable-auto-import
+ <toolset>gcc:<linkflags>--enable-auto-import
;
SOURCES = chrono process_clock thread_clock run_timer run_timer_static process_cpu_clocks ;
lib boost_chrono
- : $(SOURCES).cpp
- #$(BOOST_ROOT)/libs/system/build//boost_system
+ : $(SOURCES).cpp
+ #$(BOOST_ROOT)/libs/system/build//boost_system
:
<link>shared:<define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
<link>static:<define>BOOST_All_STATIC_LINK=1 # tell source we're building static lib's
Modified: sandbox/chrono/libs/chrono/example/function_stopclock_example.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/function_stopclock_example.cpp (original)
+++ sandbox/chrono/libs/chrono/example/function_stopclock_example.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -13,7 +13,7 @@
using namespace boost::chrono;
int f1(long j)
{
- function_stopclock<> _(BOOST_CURRENT_FUNCTION);
+ function_stopclock<> _(BOOST_CURRENT_FUNCTION);
for ( long i = 0; i < j; ++i )
std::sqrt( 123.456L ); // burn some time
@@ -22,7 +22,7 @@
}
int main()
{
- function_stopclock<> _(BOOST_CURRENT_FUNCTION);
+ function_stopclock<> _(BOOST_CURRENT_FUNCTION);
f1(1000);
f1(2000);
Modified: sandbox/chrono/libs/chrono/example/io_ex1.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/io_ex1.cpp (original)
+++ sandbox/chrono/libs/chrono/example/io_ex1.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -47,12 +47,12 @@
cout << "\nsystem_clock::now() = " << system_clock::now() << '\n';
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
cout << "monotonic_clock::now() = " << monotonic_clock::now() << '\n';
-#endif
+#endif
cout << "\nSet cout to use long names:\n" << duration_long
<< "high_resolution_clock::now() = " << high_resolution_clock::now() << '\n';
-#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
+#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
cout << "\nthread_clock::now() = " << thread_clock::now() << '\n';
-#endif
+#endif
cout << "\nprocess_real_cpu_clock::now() = " << process_real_cpu_clock::now() << '\n';
cout << "\nprocess_user_cpu_clock::now() = " << process_user_cpu_clock::now() << '\n';
cout << "\nprocess_system_cpu_clock::now() = " << process_system_cpu_clock::now() << '\n';
Modified: sandbox/chrono/libs/chrono/example/io_ex2.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/io_ex2.cpp (original)
+++ sandbox/chrono/libs/chrono/example/io_ex2.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -32,7 +32,7 @@
in >> d;
assert(in.fail());
assert(d == seconds(4));
-
+
return 0;
}
Modified: sandbox/chrono/libs/chrono/example/io_ex3.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/io_ex3.cpp (original)
+++ sandbox/chrono/libs/chrono/example/io_ex3.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -17,7 +17,7 @@
#include <iostream>
#include <cassert>
-int main()
+int main()
{
using namespace std;
using namespace boost::chrono;
@@ -33,10 +33,10 @@
cout << t1 << '\n';
high_resolution_clock::time_point t = high_resolution_clock::now();
cout << t << '\n';
-
+
cout << "That took " << t - t0 << '\n';
cout << "That took " << t - t1 << '\n';
-
+
return 0;
}
Modified: sandbox/chrono/libs/chrono/example/io_ex4.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/io_ex4.cpp (original)
+++ sandbox/chrono/libs/chrono/example/io_ex4.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -26,7 +26,7 @@
T tp = monotonic_clock::now();
std::cout << tp << '\n';
#endif
- return 0;
+ return 0;
}
//~ 17.8666 hours since boot
Modified: sandbox/chrono/libs/chrono/example/io_ex5.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/io_ex5.cpp (original)
+++ sandbox/chrono/libs/chrono/example/io_ex5.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -78,7 +78,7 @@
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
display(cout, monotonic_clock::now().time_since_epoch()
+ duration<long, mega>(1)) << '\n';
-#endif
+#endif
display(cout, -milliseconds(6)) << '\n';
display(cout, duration<long, mega>(1)) << '\n';
display(cout, -duration<long, mega>(1)) << '\n';
Modified: sandbox/chrono/libs/chrono/example/min_time_point.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/example/min_time_point.cpp (original)
+++ sandbox/chrono/libs/chrono/example/min_time_point.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -52,7 +52,7 @@
void test_min()
{
-#if 0
+#if 0
typedef time_point<system_clock,
boost::common_type<system_clock::duration, seconds>::type> T1;
typedef time_point<system_clock,
@@ -65,7 +65,7 @@
BOOST_AUTO(t1, system_clock::now() + seconds(3));
BOOST_AUTO(t2, system_clock::now() + nanoseconds(3));
BOOST_AUTO(t3, (min)(t1, t2));
-#endif
+#endif
print_duration(std::cout, t1 - t3);
print_duration(std::cout, t2 - t3);
}
Modified: sandbox/chrono/libs/chrono/src/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/process_clock.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -50,9 +50,9 @@
tps.real=process_clock::time_point(t.real);
tps.user=process_clock::time_point(t.user);
tps.system=process_clock::time_point(t.system);
-
+
}
-
+
}}
#endif
Modified: sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp (original)
+++ sandbox/chrono/libs/chrono/src/process_cpu_clocks.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -43,14 +43,14 @@
process_clock::now(t, ec);
return process_system_cpu_clock::time_point(t.system);
}
-
+
process_cpu_clock::time_point process_cpu_clock::now( system::error_code & ec ) {
process_times t;
process_clock::now(t,ec);
- time_point::rep r(t.real.count(), t.user.count(), t.system.count());
+ time_point::rep r(t.real.count(), t.user.count(), t.system.count());
return time_point(duration(r));
}
-
+
} // namespace chrono
} // namespace boost
Modified: sandbox/chrono/libs/chrono/src/run_timer.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/run_timer.cpp (original)
+++ sandbox/chrono/libs/chrono/src/run_timer.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -96,7 +96,7 @@
{
namespace chrono
{
-
+
run_timer::run_timer( system::error_code & ec )
: m_places(m_default_places), m_os(m_cout()) { start(ec); }
@@ -162,7 +162,7 @@
ec.assign(system::errc::success, system::generic_category);
#else
ec.assign(system::errc::success, system::generic_category());
-#endif
+#endif
//ec = error_code( EIO, errno_ecat );
}
}
Modified: sandbox/chrono/libs/chrono/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/test/Jamfile.v2 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -28,12 +28,12 @@
: requirements
<os>LINUX:<threading>multi
<library>/boost/system//boost_system/<link>static
-
+
# uncomment the line above if you build outside the Boost release
#<include>$(BOOST_ROOT)
# uncomment the line above if you build outside the Boost release
#<include>../../..
-
+
<toolset>msvc:<asynch-exceptions>on
<define>BOOST_ENABLE_WARNINGS
<define>BOOST_CHRONO_USES_MPL_ASSERT
@@ -47,69 +47,69 @@
rule chrono-run ( sources )
{
- return
- [ run $(sources) ../build//boost_chrono
+ return
+ [ run $(sources) ../build//boost_chrono
: : : <define>BOOST_USE_WINDOWS_H
: $(sources[1]:B)_shared ]
- [ run $(sources) ../build//boost_chrono/<link>static
- : : :
+ [ run $(sources) ../build//boost_chrono/<link>static
+ : : :
: $(sources[1]:B)_static ]
- [ run $(sources)
- : : : <define>BOOST_CHRONO_INLINED
+ [ run $(sources)
+ : : : <define>BOOST_CHRONO_INLINED
: $(sources[1]:B)_header ]
- [ run $(sources)
- : : : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
+ [ run $(sources)
+ : : : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
: $(sources[1]:B)_header_win ]
;
-}
+}
rule chrono-run2 ( sources : name )
{
- return
- [ run $(sources) ../build//boost_chrono
+ return
+ [ run $(sources) ../build//boost_chrono
: : : <define>BOOST_USE_WINDOWS_H
: $(name)_shared ]
- [ run $(sources) ../build//boost_chrono/<link>static
- : : :
+ [ run $(sources) ../build//boost_chrono/<link>static
+ : : :
: $(name)_static ]
- [ run $(sources)
- : : : <define>BOOST_CHRONO_INLINED
+ [ run $(sources)
+ : : : <define>BOOST_CHRONO_INLINED
: $(name)_header ]
- [ run $(sources)
- : : : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
+ [ run $(sources)
+ : : : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
: $(name)_header_win ]
;
-}
+}
rule chrono-compile ( sources )
{
- return
- [ compile $(sources)
+ return
+ [ compile $(sources)
:
: $(sources[1]:B)_lib ]
- [ compile $(sources)
- : <define>BOOST_CHRONO_INLINED
+ [ compile $(sources)
+ : <define>BOOST_CHRONO_INLINED
: $(sources[1]:B)_header ]
- [ compile $(sources)
- : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
+ [ compile $(sources)
+ : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
: $(sources[1]:B)_header_win ]
;
-}
-
+}
+
rule chrono-compile2 ( sources : name )
{
- return
- [ compile $(sources)
+ return
+ [ compile $(sources)
:
: $(name)_lib ]
- [ compile $(sources)
- : <define>BOOST_CHRONO_INLINED
+ [ compile $(sources)
+ : <define>BOOST_CHRONO_INLINED
: $(name)_header ]
- [ compile $(sources)
- : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
+ [ compile $(sources)
+ : <define>BOOST_CHRONO_INLINED <define>BOOST_USE_WINDOWS_H
: $(name)_header_win ]
;
-}
-
+}
+
test-suite "minmax"
@@ -181,7 +181,7 @@
[ compile-fail duration/positive_num.fail.cpp ]
[ chrono-compile duration/default_ratio.pass.cpp ]
[ chrono-compile duration/types.pass.cpp ]
-
+
[ chrono-run duration/arithmetic/op_divide_ass.pass.cpp ]
[ chrono-run duration/arithmetic/op_minusminusint.pass.cpp ]
[ chrono-run duration/arithmetic/op_plus_ass.pass.cpp ]
@@ -194,13 +194,13 @@
[ chrono-run duration/arithmetic/op_minusminus.pass.cpp ]
[ chrono-run duration/arithmetic/op_plus.pass.cpp ]
[ chrono-run duration/arithmetic/op_times_ass.pass.cpp ]
-
+
[ chrono-run duration/cast/duration_cast.pass.cpp ]
[ compile-fail duration/cast/toduration.fail.cpp ]
-
+
[ chrono-run duration/comparisons/op_equal.pass.cpp ]
[ chrono-run duration/comparisons/op_less.pass.cpp ]
-
+
[ chrono-run duration/cons/convert_exact.pass.cpp ]
[ compile-fail duration/cons/convert_float_to_int.fail.cpp ]
[ compile-fail duration/cons/convert_inexact.fail.cpp ]
@@ -212,7 +212,7 @@
[ compile-fail duration/cons/rep02.fail.cpp ]
[ chrono-run duration/cons/rep02.pass.cpp ]
[ compile-fail duration/cons/rep03.fail.cpp ]
-
+
[ chrono-run2 duration/nonmember/op_plus.pass.cpp : nonmember_op_plus.pass ]
[ chrono-run2 duration/nonmember/op_minus.pass.cpp : nonmember_op_minus.pass ]
[ chrono-run2 duration/nonmember/op_divide_duration.pass.cpp : nonmember_op_divide_duration.pass ]
@@ -237,25 +237,25 @@
[ chrono-run2 time_point/arithmetic/op_plus_ass.pass.cpp : time_point.op_plus_ass.pass ]
[ chrono-run2 time_point/arithmetic/op_minus_ass.pass.cpp : time_point.op_minus_ass.pass ]
-
+
[ chrono-run2 time_point/cast/time_point_cast.pass.cpp : time_point.time_point_cast.pass ]
[ compile-fail time_point/cast/toduration.fail.cpp : : time_point.toduration.fail ]
-
+
[ compile-fail time_point/comparisons/op_equal.fail.cpp : : time_point.op_equal.fail ]
[ chrono-run2 time_point/comparisons/op_equal.pass.cpp : time_point.op_equal.pass ]
[ compile-fail time_point/comparisons/op_less.fail.cpp : : time_point.op_less.fail ]
[ chrono-run2 time_point/comparisons/op_less.pass.cpp : time_point.op_less.pass ]
-
+
[ compile-fail time_point/cons/convert.fail.cpp : : time_point.convert.fail ]
[ chrono-run2 time_point/cons/convert.pass.cpp : time_point.convert.pass ]
[ chrono-run2 time_point/cons/default.pass.cpp : time_point.default.pass ]
[ compile-fail time_point/cons/duration.fail.cpp : : time_point.cons.duration.fail ]
[ chrono-run2 time_point/cons/duration.pass.cpp : time_point.duration.pass ]
-
+
[ chrono-run2 time_point/nonmember/op_plus.pass.cpp : time_point.op_plus.pass ]
[ chrono-run2 time_point/nonmember/op_minus_time_point.pass.cpp : time_point.op_minus_time_point.pass ]
[ chrono-run2 time_point/nonmember/op_minus_duration.pass.cpp : time_point.op_minus_duration.pass ]
-
+
[ chrono-run2 time_point/special/max.pass.cpp : time_point.max.pass ]
[ chrono-run2 time_point/special/min.pass.cpp : time_point.min.pass ]
;
@@ -264,25 +264,25 @@
:
[ chrono-compile2 clock/hires/consistency.pass.cpp : clock.hires.consistency.pass ]
[ chrono-run2 clock/hires/now.pass.cpp : clock.hires.now.pass ]
-
+
[ chrono-compile2 clock/monotonic/consistency.pass.cpp : clock.monotonic.consistency.pass ]
[ chrono-run2 clock/monotonic/now.pass.cpp : clock.monotonic.now.pass ]
-
+
[ chrono-compile2 clock/system/consistency.pass.cpp : clock.system.consistency.pass ]
[ chrono-run2 clock/system/now.pass.cpp : clock.system.now.pass ]
[ chrono-run2 clock/system/from_time_t.pass.cpp : clock.system.from_time_t.pass ]
[ chrono-run2 clock/system/rep_signed.pass.cpp : clock.system.rep_signed.pass ]
[ chrono-run2 clock/system/to_time_t.pass.cpp : clock.system.to_time_t.pass ]
-
+
[ chrono-compile2 clock/process/consistency.pass.cpp : clock.process.consistency.pass ]
[ chrono-run2 clock/process/now.pass.cpp : clock.process.now.pass ]
-
+
[ chrono-compile2 clock/thread/consistency.pass.cpp : clock.thread.consistency.pass ]
[ chrono-run2 clock/thread/now.pass.cpp : clock.thread.now.pass ]
[ chrono-compile2 clock/errored/consistency.pass.cpp : clock.errored.consistency.pass ]
[ chrono-run2 clock/errored/now.pass.cpp : clock.errored.now.pass ]
-
+
;
@@ -299,4 +299,3 @@
:
[ chrono-run win32_test.cpp ]
;
-
\ No newline at end of file
Modified: sandbox/chrono/libs/chrono/test/chrono_accuracy_test.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/chrono_accuracy_test.cpp (original)
+++ sandbox/chrono/libs/chrono/test/chrono_accuracy_test.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -37,12 +37,12 @@
timeout_in_clock_t += (timeout_in_secs * CLOCKS_PER_SEC);
boost::chrono::system_timer sys;
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
boost::chrono::monotonic_timer mono;
-#endif
+#endif
boost::chrono::high_resolution_timer hires;
boost::chrono::process_timer process;
-
+
std::clock_t now;
do
{
@@ -50,9 +50,9 @@
} while ( now < timeout_in_clock_t );
boost::chrono::system_timer::duration sys_dur = sys.elapsed();
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
boost::chrono::monotonic_timer::duration mono_dur = mono.elapsed();
-#endif
+#endif
boost::chrono::high_resolution_timer::duration hires_dur = hires.elapsed();
boost::chrono::process_times times;
process.elapsed( times );
@@ -73,12 +73,12 @@
BOOST_TEST( sys_dur > timeout_in_nanoseconds - maximum_delta
&& sys_dur < timeout_in_nanoseconds + maximum_delta );
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
std::cout << mono_dur.count() << " mono_dur\n";
BOOST_TEST( mono_dur > timeout_in_nanoseconds - maximum_delta
&& mono_dur < timeout_in_nanoseconds + maximum_delta );
-#endif
+#endif
std::cout << hires_dur.count() << " hires_dur\n";
@@ -96,7 +96,7 @@
int main( int argc, char * argv[] )
{
accuracy_test( argc, argv );
-
+
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/clock/errored/now.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/errored/now.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/errored/now.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -10,6 +10,6 @@
{
check_clock_now_err<errored_clock>(1);
check_clock_now_ec_err<errored_clock>(1);
-
+
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/clock/errored_clock.hpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/errored_clock.hpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/errored_clock.hpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -34,19 +34,19 @@
static time_point now() {
boost::throw_exception(
boost::system::system_error(
- errno_,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "errored_clock"
+ errno_,
+ BOOST_CHRONO_SYSTEM_CATEGORY,
+ "errored_clock"
)
);
return time_point();
- }
+ }
// never throws and set ec
static time_point now(boost::system::error_code & ec) {
ec.assign( errno_, BOOST_CHRONO_SYSTEM_CATEGORY );
return time_point();
- };
+ };
};
int errored_clock::errno_;
-
-#endif
+
+#endif
Modified: sandbox/chrono/libs/chrono/test/clock/process/now.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/process/now.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/process/now.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -11,15 +11,15 @@
{
check_clock_now<boost::chrono::process_real_cpu_clock>();
check_clock_now_ec<boost::chrono::process_real_cpu_clock>();
-
+
check_clock_now<boost::chrono::process_user_cpu_clock>();
check_clock_now_ec<boost::chrono::process_user_cpu_clock>();
-
+
check_clock_now<boost::chrono::process_system_cpu_clock>();
check_clock_now_ec<boost::chrono::process_system_cpu_clock>();
-
+
check_clock_now<boost::chrono::process_cpu_clock>();
check_clock_now_ec<boost::chrono::process_cpu_clock>();
-
+
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/clock/system/from_time_t.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/system/from_time_t.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/system/from_time_t.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -25,5 +25,5 @@
{
typedef boost::chrono::system_clock C;
C::time_point t1 = C::from_time_t(C::to_time_t(C::now()));
- return 0;
+ return 0;
}
Modified: sandbox/chrono/libs/chrono/test/clock/system/now.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/system/now.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/system/now.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -10,6 +10,6 @@
{
check_clock_now<boost::chrono::system_clock>();
check_clock_now_ec<boost::chrono::system_clock>();
-
+
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/system/rep_signed.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -25,5 +25,5 @@
{
assert((boost::chrono::system_clock::duration::min)() <
boost::chrono::system_clock::duration::zero());
- return 0;
+ return 0;
}
Modified: sandbox/chrono/libs/chrono/test/clock/system/to_time_t.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/system/to_time_t.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/system/to_time_t.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -26,5 +26,5 @@
typedef boost::chrono::system_clock C;
std::time_t t1 = C::to_time_t(C::now());
(void)t1;
- return 0;
+ return 0;
}
Modified: sandbox/chrono/libs/chrono/test/clock/thread/consistency.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/thread/consistency.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/thread/consistency.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -8,7 +8,7 @@
void test()
{
-#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
+#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
check_clock_invariants<boost::chrono::thread_clock>();
-#endif
+#endif
}
Modified: sandbox/chrono/libs/chrono/test/clock/thread/now.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock/thread/now.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock/thread/now.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -10,8 +10,8 @@
int main()
{
-#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
+#if defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
check_clock_now<boost::chrono::thread_clock>();
-#endif
- return 0;
+#endif
+ return 0;
}
Modified: sandbox/chrono/libs/chrono/test/clock_name.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock_name.cpp (original)
+++ sandbox/chrono/libs/chrono/test/clock_name.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -15,6 +15,6 @@
std::cout << name<boost::chrono::system_clock>::apply() << '\n';
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
std::cout << name<boost::chrono::monotonic_clock>::apply() << '\n';
-#endif
+#endif
std::cout << name<boost::chrono::high_resolution_clock>::apply() << '\n';
}
Modified: sandbox/chrono/libs/chrono/test/clock_name.hpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/clock_name.hpp (original)
+++ sandbox/chrono/libs/chrono/test/clock_name.hpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -24,7 +24,7 @@
bool = boost::is_same<Clock, boost::chrono::high_resolution_clock>::value
>
struct name;
-
+
template <typename Clock>
struct name<Clock, false, false, false> {
static const char* apply() { return "unknown clock";}
Modified: sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/cast/duration_cast.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -17,7 +17,7 @@
typedef BOOST_TYPEOF_TPL(boost::chrono::duration_cast<ToDuration>(f)) R;
#else
typedef decltype(boost::chrono::duration_cast<ToDuration>(f)) R;
-#endif
+#endif
BOOST_CHRONO_STATIC_ASSERT((boost::is_same<R, ToDuration>::value), NOTHING, ());
BOOST_TEST(boost::chrono::duration_cast<ToDuration>(f) == d);
}
Modified: sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/duration/default_ratio.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -16,5 +16,5 @@
BOOST_CHRONO_STATIC_ASSERT((boost::is_same<
boost::chrono::duration<int, boost::ratio<1> >,
- boost::chrono::duration<int>
+ boost::chrono::duration<int>
>::value), NOTHING, ());
Modified: sandbox/chrono/libs/chrono/test/explore_limits.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/explore_limits.cpp (original)
+++ sandbox/chrono/libs/chrono/test/explore_limits.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -11,8 +11,8 @@
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
-The original code was modified to conform to Boost conventions and to section
-20.9 Time utilities [time] of the C++ committee's working paper N2798.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
@@ -38,13 +38,13 @@
{
typedef duration<long long, boost::ratio_multiply<boost::ratio<24*3652425,10000>,
hours::period>::type> Years;
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
monotonic_clock::time_point t1( Years(250));
monotonic_clock::time_point t2(-Years(250));
-#else
+#else
system_clock::time_point t1( Years(250));
system_clock::time_point t2(-Years(250));
-#endif
+#endif
// nanosecond resolution is likely to overflow. "up cast" to microseconds.
// The "up cast" trades precision for range.
microseconds d = time_point_cast<microseconds>(t1) - time_point_cast<microseconds>(t2);
Modified: sandbox/chrono/libs/chrono/test/hours.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/hours.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/hours.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -6,7 +6,7 @@
#include <boost/type_traits.hpp>
#include <limits>
-#if !defined(BOOST_NO_STATIC_ASSERT)
+#if !defined(BOOST_NO_STATIC_ASSERT)
#define NOTHING ""
#endif
Modified: sandbox/chrono/libs/chrono/test/manipulate_clock_object.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/manipulate_clock_object.cpp (original)
+++ sandbox/chrono/libs/chrono/test/manipulate_clock_object.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -11,8 +11,8 @@
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
-The original code was modified to conform to Boost conventions and to section
-20.9 Time utilities [time] of the C++ committee's working paper N2798.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
@@ -39,14 +39,14 @@
#endif
void manipulate_clock_object(system_clock clock)
#if defined _MSC_VER
-#pragma warning(pop)
+#pragma warning(pop)
#endif
{
system_clock::duration delay = milliseconds(5);
system_clock::time_point start = clock.now();
while ((clock.now() - start) <= delay) {}
-
+
system_clock::time_point stop = clock.now();
system_clock::duration elapsed = stop - start;
std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
Modified: sandbox/chrono/libs/chrono/test/microseconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/microseconds.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/microseconds.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -6,7 +6,7 @@
#include <boost/type_traits.hpp>
#include <limits>
-#if !defined(BOOST_NO_STATIC_ASSERT)
+#if !defined(BOOST_NO_STATIC_ASSERT)
#define NOTHING ""
#endif
Modified: sandbox/chrono/libs/chrono/test/milliseconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/milliseconds.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/milliseconds.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -6,7 +6,7 @@
#include <boost/type_traits.hpp>
#include <limits>
-#if !defined(BOOST_NO_STATIC_ASSERT)
+#if !defined(BOOST_NO_STATIC_ASSERT)
#define NOTHING ""
#endif
Modified: sandbox/chrono/libs/chrono/test/minutes.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/minutes.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/minutes.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -6,7 +6,7 @@
#include <boost/type_traits.hpp>
#include <limits>
-#if !defined(BOOST_NO_STATIC_ASSERT)
+#if !defined(BOOST_NO_STATIC_ASSERT)
#define NOTHING ""
#endif
Modified: sandbox/chrono/libs/chrono/test/miscellaneous.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/miscellaneous.cpp (original)
+++ sandbox/chrono/libs/chrono/test/miscellaneous.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -11,8 +11,8 @@
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
-The original code was modified to conform to Boost conventions and to section
-20.9 Time utilities [time] of the C++ committee's working paper N2798.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Modified: sandbox/chrono/libs/chrono/test/nanoseconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/nanoseconds.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/nanoseconds.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -6,7 +6,7 @@
#include <boost/type_traits.hpp>
#include <limits>
-#if !defined(BOOST_NO_STATIC_ASSERT)
+#if !defined(BOOST_NO_STATIC_ASSERT)
#define NOTHING ""
#endif
Modified: sandbox/chrono/libs/chrono/test/run_timer_test.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/run_timer_test.cpp (original)
+++ sandbox/chrono/libs/chrono/test/run_timer_test.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -33,7 +33,7 @@
typedef boost::chrono::nanoseconds ns;
bool check_report( run_timer & tmr, std::stringstream & ss,
- run_timer::duration r, run_timer::duration u, run_timer::duration s,
+ run_timer::duration r, run_timer::duration u, run_timer::duration s,
const std::string & expected, int line )
{
tmr.test_report(r,u,s);
@@ -95,12 +95,12 @@
timeout_in_clock_t += (timeout_in_secs * CLOCKS_PER_SEC);
boost::chrono::system_timer sys;
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
boost::chrono::monotonic_timer mono;
-#endif
+#endif
boost::chrono::high_resolution_timer hires;
boost::chrono::process_timer process;
-
+
std::clock_t now;
do
{
@@ -108,9 +108,9 @@
} while ( now < timeout_in_clock_t );
boost::chrono::system_timer::duration sys_dur = sys.elapsed();
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
boost::chrono::monotonic_timer::duration mono_dur = mono.elapsed();
-#endif
+#endif
boost::chrono::high_resolution_timer::duration hires_dur = hires.elapsed();
boost::chrono::process_times times;
process.elapsed( times );
@@ -131,12 +131,12 @@
BOOST_TEST( sys_dur > timeout_in_nanoseconds - maximum_delta
&& sys_dur < timeout_in_nanoseconds + maximum_delta );
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
std::cout << mono_dur.count() << " mono_dur\n";
BOOST_TEST( mono_dur > timeout_in_nanoseconds - maximum_delta
&& mono_dur < timeout_in_nanoseconds + maximum_delta );
-#endif
+#endif
std::cout << hires_dur.count() << " hires_dur\n";
@@ -183,10 +183,10 @@
std::cout << "process_timer_test..." << std::flush;
boost::chrono::process_timer t;
- double res=0; // avoids optimization
+ double res=0; // avoids optimization
for (long i = 0; i < 10000000L; ++i)
{
- res+=std::sqrt( static_cast<double>(i) ); // avoids optimization
+ res+=std::sqrt( static_cast<double>(i) ); // avoids optimization
}
boost::chrono::process_times times;
@@ -220,7 +220,7 @@
run_timer_constructor_overload_test();
process_timer_test();
report_test();
-
+
return boost::report_errors();
}
Modified: sandbox/chrono/libs/chrono/test/seconds.pass.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/seconds.pass.cpp (original)
+++ sandbox/chrono/libs/chrono/test/seconds.pass.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -6,7 +6,7 @@
#include <boost/type_traits.hpp>
#include <limits>
-#if !defined(BOOST_NO_STATIC_ASSERT)
+#if !defined(BOOST_NO_STATIC_ASSERT)
#define NOTHING ""
#endif
Modified: sandbox/chrono/libs/chrono/test/test_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/test_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/test/test_clock.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -11,8 +11,8 @@
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
-The original code was modified to conform to Boost conventions and to section
-20.9 Time utilities [time] of the C++ committee's working paper N2798.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
@@ -90,7 +90,7 @@
void test_monotonic_clock()
{
-#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
+#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
std::cout << "monotonic_clock test" << std::endl;
monotonic_clock::duration delay = milliseconds(5);
monotonic_clock::time_point start = monotonic_clock::now();
@@ -159,7 +159,7 @@
test_monotonic_clock();
test_hi_resolution_clock();
//test_mixed_clock();
- test_clock<system_clock>();
+ test_clock<system_clock>();
#ifdef BOOST_CHRONO_HAS_CLOCK_MONOTONIC
test_clock<monotonic_clock>();
#endif
Modified: sandbox/chrono/libs/chrono/test/test_duration.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/test_duration.cpp (original)
+++ sandbox/chrono/libs/chrono/test/test_duration.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -11,8 +11,8 @@
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
-The original code was modified to conform to Boost conventions and to section
-20.9 Time utilities [time] of the C++ committee's working paper N2798.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
@@ -157,7 +157,7 @@
assert(us5.count()==300000000);
//minutes m4 = m3 + us3; // won't compile
-
+
minutes m4 = duration_cast<minutes>(m3 + us3); // m4.count() == 5
assert(m4.count()==5);
@@ -181,7 +181,7 @@
{
double r = double(milliseconds(3) / milliseconds(3));
std::cout << r << '\n';
-
+
duration<double, boost::milli> d = milliseconds(3) * 2.5;
duration<double, boost::milli> d2 = 2.5 * milliseconds(3) ;
duration<double, boost::milli> d3 = milliseconds(3) / 2.5;
Modified: sandbox/chrono/libs/chrono/test/test_special_values.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/test_special_values.cpp (original)
+++ sandbox/chrono/libs/chrono/test/test_special_values.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -11,8 +11,8 @@
This code was extracted by Vicente J. Botet Escriba from Beman Dawes time2_demo.cpp which
was derived by Beman Dawes from Howard Hinnant's time2_demo prototype.
Many thanks to Howard for making his code available under the Boost license.
-The original code was modified to conform to Boost conventions and to section
-20.9 Time utilities [time] of the C++ committee's working paper N2798.
+The original code was modified to conform to Boost conventions and to section
+20.9 Time utilities [time] of the C++ committee's working paper N2798.
See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf.
time2_demo contained this comment:
Modified: sandbox/chrono/libs/chrono/test/test_thread_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/test_thread_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/test/test_thread_clock.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -29,7 +29,7 @@
std::cout << "thread_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
#else
std::cout << "thread_clock not available\n";
-#endif
+#endif
}
Modified: sandbox/chrono/libs/chrono/test/win32_test.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/win32_test.cpp (original)
+++ sandbox/chrono/libs/chrono/test/win32_test.cpp 2010-10-17 18:26:59 EDT (Sun, 17 Oct 2010)
@@ -15,81 +15,81 @@
#define NOTHING ""
#endif
-#include <boost/detail/win/time.hpp>
+#include <boost/detail/win/basic_types.hpp>
#include <windows.h>
#include <boost/type_traits.hpp>
#include <boost/typeof/typeof.hpp>
void test() {
- {
- boost::detail::win32::LARGE_INTEGER_ a;
- LARGE_INTEGER b;
+ {
+ boost::detail::win32::LARGE_INTEGER_ a;
+ LARGE_INTEGER b;
BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::LARGE_INTEGER_)==sizeof(LARGE_INTEGER)
- ), NOTHING, (boost::detail::win32::LARGE_INTEGER_, LARGE_INTEGER));
+ sizeof(boost::detail::win32::LARGE_INTEGER_)==sizeof(LARGE_INTEGER)
+ ), NOTHING, (boost::detail::win32::LARGE_INTEGER_, LARGE_INTEGER));
BOOST_TEST((
- sizeof(a.QuadPart)==sizeof(b.QuadPart)
- ));
+ sizeof(a.QuadPart)==sizeof(b.QuadPart)
+ ));
BOOST_CHRONO_STATIC_ASSERT((
- offsetof(boost::detail::win32::LARGE_INTEGER_, QuadPart)==offsetof(LARGE_INTEGER, QuadPart)
- ), NOTHING, (boost::detail::win32::LARGE_INTEGER_, LARGE_INTEGER));
- }
+ offsetof(boost::detail::win32::LARGE_INTEGER_, QuadPart)==offsetof(LARGE_INTEGER, QuadPart)
+ ), NOTHING, (boost::detail::win32::LARGE_INTEGER_, LARGE_INTEGER));
+ }
// BOOST_CHRONO_STATIC_ASSERT((
-// boost::is_same<
-// BOOST_TYPEOF(boost::detail::win32::LARGE_INTEGER_::QuadPart),
-// BOOST_TYPEOF(LARGE_INTEGER::QuadPart)
-// >::value
-// ), NOTHING, (boost::detail::win32::LARGE_INTEGER_, LARGE_INTEGER));
-
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::BOOL_)==sizeof(BOOL)
- ), NOTHING, (boost::detail::win32::BOOL_, BOOL));
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::DWORD_)==sizeof(DWORD)
- ), NOTHING, (boost::detail::win32::DWORD_, DWORD));
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::HANDLE_)==sizeof(HANDLE)
- ), NOTHING, (boost::detail::win32::HANDLE_, HANDLE));
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::LONG_)==sizeof(LONG)
- ), NOTHING, (boost::detail::win32::LONG_, LONG));
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::LONGLONG_)==sizeof(LONGLONG)
- ), NOTHING, (boost::detail::win32::LONGLONG_, LONGLONG));
- BOOST_CHRONO_STATIC_ASSERT((
- boost::is_same<boost::detail::win32::LONGLONG_,LONGLONG>::value
- ), NOTHING, (boost::detail::win32::LONGLONG_, LONGLONG));
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::PLARGE_INTEGER_)==sizeof(PLARGE_INTEGER)
- ), NOTHING, (boost::detail::win32::PLARGE_INTEGER_, PLARGE_INTEGER));
- {
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::FILETIME_)==sizeof(FILETIME)
- ), NOTHING, (boost::detail::win32::FILETIME_, FILETIME));
- BOOST_CHRONO_STATIC_ASSERT((
- sizeof(boost::detail::win32::PFILETIME_)==sizeof(PFILETIME)
- ), NOTHING, (boost::detail::win32::PFILETIME_, PFILETIME));
+// boost::is_same<
+// BOOST_TYPEOF(boost::detail::win32::LARGE_INTEGER_::QuadPart),
+// BOOST_TYPEOF(LARGE_INTEGER::QuadPart)
+// >::value
+// ), NOTHING, (boost::detail::win32::LARGE_INTEGER_, LARGE_INTEGER));
- boost::detail::win32::FILETIME_ a;
- FILETIME b;
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::BOOL_)==sizeof(BOOL)
+ ), NOTHING, (boost::detail::win32::BOOL_, BOOL));
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::DWORD_)==sizeof(DWORD)
+ ), NOTHING, (boost::detail::win32::DWORD_, DWORD));
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::HANDLE_)==sizeof(HANDLE)
+ ), NOTHING, (boost::detail::win32::HANDLE_, HANDLE));
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::LONG_)==sizeof(LONG)
+ ), NOTHING, (boost::detail::win32::LONG_, LONG));
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::LONGLONG_)==sizeof(LONGLONG)
+ ), NOTHING, (boost::detail::win32::LONGLONG_, LONGLONG));
+ BOOST_CHRONO_STATIC_ASSERT((
+ boost::is_same<boost::detail::win32::LONGLONG_,LONGLONG>::value
+ ), NOTHING, (boost::detail::win32::LONGLONG_, LONGLONG));
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::PLARGE_INTEGER_)==sizeof(PLARGE_INTEGER)
+ ), NOTHING, (boost::detail::win32::PLARGE_INTEGER_, PLARGE_INTEGER));
+ {
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::FILETIME_)==sizeof(FILETIME)
+ ), NOTHING, (boost::detail::win32::FILETIME_, FILETIME));
+ BOOST_CHRONO_STATIC_ASSERT((
+ sizeof(boost::detail::win32::PFILETIME_)==sizeof(PFILETIME)
+ ), NOTHING, (boost::detail::win32::PFILETIME_, PFILETIME));
+
+ boost::detail::win32::FILETIME_ a;
+ FILETIME b;
BOOST_TEST((
- sizeof(a.dwLowDateTime)==sizeof(b.dwLowDateTime)
- ));
+ sizeof(a.dwLowDateTime)==sizeof(b.dwLowDateTime)
+ ));
BOOST_TEST((
- sizeof(a.dwHighDateTime)==sizeof(b.dwHighDateTime)
- ));
+ sizeof(a.dwHighDateTime)==sizeof(b.dwHighDateTime)
+ ));
+ BOOST_CHRONO_STATIC_ASSERT((
+ offsetof(boost::detail::win32::FILETIME_, dwLowDateTime)==offsetof(FILETIME, dwLowDateTime)
+ ), NOTHING, (boost::detail::win32::FILETIME_, FILETIME));
BOOST_CHRONO_STATIC_ASSERT((
- offsetof(boost::detail::win32::FILETIME_, dwLowDateTime)==offsetof(FILETIME, dwLowDateTime)
- ), NOTHING, (boost::detail::win32::FILETIME_, FILETIME));
- BOOST_CHRONO_STATIC_ASSERT((
- offsetof(boost::detail::win32::FILETIME_, dwHighDateTime)==offsetof(FILETIME, dwHighDateTime)
- ), NOTHING, (boost::detail::win32::FILETIME_, FILETIME));
-
+ offsetof(boost::detail::win32::FILETIME_, dwHighDateTime)==offsetof(FILETIME, dwHighDateTime)
+ ), NOTHING, (boost::detail::win32::FILETIME_, FILETIME));
+
}
-
+
// BOOST_CHRONO_STATIC_ASSERT((
-// GetLastError==boost::detail::win32::::GetLastError
-// ), NOTHING, ());
+// GetLastError==boost::detail::win32::::GetLastError
+// ), NOTHING, ());
}
#else
@@ -98,8 +98,8 @@
#endif
int main( )
{
- test();
-
+ test();
+
return boost::report_errors();
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk