File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ volatile int bench_utils_sink = 0;
4343
4444class cpu_timer
4545{
46- typedef boost::move_detail::cpu_times cpu_times;
4746 typedef boost::move_detail::nanosecond_type nanosecond_type;
4847
4948 nanosecond_type start_ns_;
@@ -52,9 +51,7 @@ class cpu_timer
5251
5352 BOOST_CONTAINER_FORCEINLINE static nanosecond_type now_ns ()
5453 {
55- cpu_times t;
56- boost::move_detail::get_cpu_times (t);
57- return t.wall ;
54+ return boost::move_detail::nsec_clock ();
5855 }
5956
6057 nanosecond_type robust_median () const
@@ -87,11 +84,9 @@ class cpu_timer
8784 BOOST_CONTAINER_FORCEINLINE bool is_stopped () const
8885 { return !running_; }
8986
90- cpu_times elapsed () const
87+ nanosecond_type elapsed () const
9188 {
92- cpu_times t;
93- t.wall = robust_median () * static_cast <nanosecond_type>(samples_.size ());
94- return t;
89+ return robust_median () * static_cast <nanosecond_type>(samples_.size ());
9590 }
9691
9792 void start ()
@@ -100,7 +95,7 @@ class cpu_timer
10095 start_ns_ = now_ns ();
10196 running_ = true ;
10297 }
103-
98+
10499 void stop ()
105100 {
106101 if (!running_)
You can’t perform that action at this time.
0 commit comments