Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64811 - sandbox/chrono/libs/chrono/test
From: vicente.botet_at_[hidden]
Date: 2010-08-15 03:17:49


Author: viboes
Date: 2010-08-15 03:17:48 EDT (Sun, 15 Aug 2010)
New Revision: 64811
URL: http://svn.boost.org/trac/boost/changeset/64811

Log:
cleanup
Removed:
   sandbox/chrono/libs/chrono/test/test_suspendable_clock.cpp
Text files modified:
   sandbox/chrono/libs/chrono/test/Jamfile.v2 | 14 +++++++-------
   1 files changed, 7 insertions(+), 7 deletions(-)

Modified: sandbox/chrono/libs/chrono/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/chrono/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/chrono/test/Jamfile.v2 2010-08-15 03:17:48 EDT (Sun, 15 Aug 2010)
@@ -39,7 +39,7 @@
         :
         [ compile-fail ratio_fail_test1.cpp ]
         [ run ratio_test.cpp : : : <link>static ]
- #[ run ratio_test.cpp : : : : ratio_test_dll ]
+ [ run ratio_test.cpp : : : : ratio_test_dll ]
         ;
 
 
@@ -92,10 +92,10 @@
 
     test-suite "other_clocks"
         :
- #[ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread <link>static ]
- #[ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread : test_suspendible_clock_dll ]
- #[ run ../example/suspendible_stopclock_example.cpp : : : <library>/boost/thread//boost_thread <link>static ]
- #[ run ../example/suspendible_stopclock_example.cpp : : : <library>/boost/thread//boost_thread : suspendible_stopclock_example_dll ]
+ [ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread <link>static ]
+ [ run test_suspendible_clock.cpp : : : <library>/boost/thread//boost_thread : test_suspendible_clock_dll ]
+ [ run ../example/suspendible_stopclock_example.cpp : : : <library>/boost/thread//boost_thread <link>static ]
+ [ run ../example/suspendible_stopclock_example.cpp : : : <library>/boost/thread//boost_thread : suspendible_stopclock_example_dll ]
         [ run test_thread_clock.cpp : : : <link>static ]
         [ run test_thread_clock.cpp : : : : test_thread_clock_dll ]
         ;
@@ -108,14 +108,14 @@
         [ run ../example/scoped_stopwatch_example.cpp : : : : scoped_stopwatch_example_dll ]
         [ run ../example/stopwatch_accumulator_example.cpp : : : <link>static ]
         [ run ../example/stopwatch_accumulator_example.cpp : : : : stopwatch_accumulator_example_dll ]
- [ run ../example/nested_stopclock_accumulator_example.cpp : : : <link>static ]
- [ run ../example/nested_stopclock_accumulator_example.cpp : : : : nested_stopclock_accumulator_example_dll ]
         [ run ../example/specific_stopwatch_accumulator_example.cpp : : : <link>static ]
         [ run ../example/specific_stopwatch_accumulator_example.cpp : : : : specific_stopwatch_accumulator_example_dll ]
         [ run ../example/stopclock_example.cpp : : : <link>static ]
         [ run ../example/stopclock_example.cpp : : : : stopclock_example_dll ]
         [ run ../example/stopclock_accumulator_example.cpp : : : <link>static ]
         [ run ../example/stopclock_accumulator_example.cpp : : : : stopclock_accumulator_example_dll ]
+ [ run ../example/nested_stopclock_accumulator_example.cpp : : : <link>static ]
+ [ run ../example/nested_stopclock_accumulator_example.cpp : : : : nested_stopclock_accumulator_example_dll ]
         [ run ../example/loop_stopclock_accumulator_example.cpp : : : <link>static ]
         [ run ../example/loop_stopclock_accumulator_example.cpp : : : : loop_stopclock_accumulator_example_dll ]
         [ run ../example/t24_hours_example.cpp : : : <link>static ]

Deleted: sandbox/chrono/libs/chrono/test/test_suspendable_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/test/test_suspendable_clock.cpp 2010-08-15 03:17:48 EDT (Sun, 15 Aug 2010)
+++ (empty file)
@@ -1,119 +0,0 @@
-// test_system_clock.cpp ----------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#include <boost/chrono/chrono.hpp>
-#include <boost/chrono/suspendible_clock.hpp>
-#include <boost/type_traits.hpp>
-
-#include <iostream>
-
-using namespace boost::chrono;
-
-void test_system_clock()
-{
- std::cout << "suspendible_clock<system_clock> test" << std::endl;
- suspendible_clock<system_clock>::duration delay = milliseconds(5);
- suspendible_clock<system_clock>::time_point start = suspendible_clock<system_clock>::now();
- while (suspendible_clock<system_clock>::now() - start <= delay)
- ;
- suspendible_clock<system_clock>::time_point stop = suspendible_clock<system_clock>::now();
- suspendible_clock<system_clock>::duration elapsed = stop - start;
- std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
- start = suspendible_clock<system_clock>::now();
- stop = suspendible_clock<system_clock>::now();
- std::cout << "suspendible_clock<system_clock> resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
- start = suspendible_clock<system_clock>::now();
-#if 0
- suspendible_clock<system_clock>::suspend();
- system_clock::duration delay3 = milliseconds(50);
- system_clock::time_point start3 = system_clock::now();
- while (system_clock::now() - start3 <= delay3)
- ;
- system_clock::time_point stop3 = system_clock::now();
- stop = suspendible_clock<system_clock>::now();
- std::cout << "system_clock 50ms: " << nanoseconds(stop3-start3).count() << " nanoseconds\n";
- std::cout << "suspendible_clock<system_clock> 50ms: " << nanoseconds(stop-start).count() << " nanoseconds\n";
- suspendible_clock<system_clock>::resume();
-#endif
-
-}
-
-void test_monotonic_clock()
-{
-#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();
- while (monotonic_clock::now() - start <= delay)
- ;
- monotonic_clock::time_point stop = monotonic_clock::now();
- monotonic_clock::duration elapsed = stop - start;
- std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
- start = monotonic_clock::now();
- stop = monotonic_clock::now();
- std::cout << "monotonic_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
-#endif
-}
-void test_hi_resolution_clock()
-{
- std::cout << "high_resolution_clock test" << std::endl;
- high_resolution_clock::duration delay = milliseconds(5);
- high_resolution_clock::time_point start = high_resolution_clock::now();
- while (high_resolution_clock::now() - start <= delay)
- ;
- high_resolution_clock::time_point stop = high_resolution_clock::now();
- high_resolution_clock::duration elapsed = stop - start;
- std::cout << "paused " << nanoseconds(elapsed).count() << " nanoseconds\n";
- start = high_resolution_clock::now();
- stop = high_resolution_clock::now();
- std::cout << "high_resolution_clock resolution estimate: " << nanoseconds(stop-start).count() << " nanoseconds\n";
-}
-
-//void test_mixed_clock()
-//{
-// std::cout << "mixed clock test" << std::endl;
-// high_resolution_clock::time_point hstart = high_resolution_clock::now();
-// std::cout << "Add 5 milliseconds to a high_resolution_clock::time_point\n";
-// monotonic_clock::time_point mend = hstart + milliseconds(5);
-// bool b = hstart == mend;
-// system_clock::time_point sstart = system_clock::now();
-// std::cout << "Subtracting system_clock::time_point from monotonic_clock::time_point doesn't compile\n";
-//// mend - sstart; // doesn't compile
-// std::cout << "subtract high_resolution_clock::time_point from monotonic_clock::time_point"
-// " and add that to a system_clock::time_point\n";
-// system_clock::time_point send = sstart + duration_cast<system_clock::duration>(mend - hstart);
-// std::cout << "subtract two system_clock::time_point's and output that in microseconds:\n";
-// microseconds ms = send - sstart;
-// std::cout << ms.count() << " microseconds\n";
-//}
-//
-//void test_c_mapping()
-//{
-// std::cout << "C map test\n";
-// using namespace boost::chrono;
-// system_clock::time_point t1 = system_clock::now();
-// std::time_t c_time = system_clock::to_time_t(t1);
-// std::tm* tmptr = std::localtime(&c_time);
-// std::cout << "It is now " << tmptr->tm_hour << ':' << tmptr->tm_min << ':' << tmptr->tm_sec << ' '
-// << tmptr->tm_year + 1900 << '-' << tmptr->tm_mon + 1 << '-' << tmptr->tm_mday << '\n';
-// c_time = std::mktime(tmptr);
-// system_clock::time_point t2 = system_clock::from_time_t(c_time);
-// microseconds ms = t1 - t2;
-// std::cout << "Round-tripping through the C interface truncated the precision by " << ms.count() << " microseconds\n";
-//}
-
-
-int main()
-{
- test_system_clock();
- //test_monotonic_clock();
- //test_hi_resolution_clock();
- //test_mixed_clock();
- return 0;
-}
-


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