[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 37023bb 3/4: Refactor
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 37023bb 3/4: Refactor |
Date: |
Mon, 28 May 2018 20:45:39 -0400 (EDT) |
branch: master
commit 37023bb04838158705c2ddb12af82af7eaeb3f1b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Refactor
---
timer.hpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/timer.hpp b/timer.hpp
index 2cca3d7..9261995 100644
--- a/timer.hpp
+++ b/timer.hpp
@@ -218,13 +218,11 @@ AliquotTimer<F>& AliquotTimer<F>::operator()()
double const start_time = static_cast<double>(timer.time_when_started_);
double const expiry_min = start_time + 0.01 * limit;
double const expiry_max = start_time + limit;
- double minimum = limit;
+ double now = start_time;
+ double previous = start_time;
+ double minimum = limit;
int j = 0;
- for
- (double now = start_time, previous = start_time
- ;now < expiry_min || j < 100 && now < expiry_max
- ;++j
- )
+ for(; now < expiry_min || j < 100 && now < expiry_max; ++j)
{
f_();
previous = now;