[CoinUtils-tickets] [COIN-OR Common Utilities] #30: cointime.hpp
logic is wrong for isPast isPastPercent
COIN-OR Common Utilities
coin-trac at coin-or.org
Sun Apr 8 14:09:27 EDT 2007
#30: cointime.hpp logic is wrong for isPast isPastPercent
------------------------+---------------------------------------------------
Reporter: mgalati | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: isPast |
------------------------+---------------------------------------------------
signs are wrong - change to:
{{{
/** Return whether the given percentage of the time limit has elapsed
since
the timer was started */
inline bool isPastPercent(double pct) const {
// return evaluate(start + limit * pct > CoinCpuTime()); //MVG
return evaluate(start + limit * pct < CoinCpuTime());
}
/** Return whether the given amount of time has elapsed since the timer
was
started */
inline bool isPast(double lim) const {
// return evaluate(start + lim > CoinCpuTime()); //MVG
return evaluate(start + lim < CoinCpuTime());
}
}}}
--
Ticket URL: <https://projects.coin-or.org/CoinUtils/ticket/30>
COIN-OR Common Utilities <http://projects.coin-or.org/CoinUtils>
Common data structures and linear algebra functions for COIN-OR projects
More information about the CoinUtils-tickets
mailing list