
Stop-object based on time More...
#include <search.hh>
Public Member Functions | |
| TimeStop (unsigned long int l) | |
| Stop if search exceeds l milliseconds (from creation of this object) | |
| unsigned long int | limit (void) const |
| Return current limit in milliseconds. | |
| void | limit (unsigned long int l) |
| Set current limit to l milliseconds. | |
| void | reset (void) |
| Reset time to zero. | |
| virtual bool | stop (const Statistics &s, const Options &o) |
| Return true if time limit is exceeded. | |
Protected Attributes | |
| Support::Timer | t |
| Time when execution should stop. | |
| unsigned long int | l |
| Current limit in milliseconds. | |
| Gecode::Search::TimeStop::TimeStop | ( | unsigned long int | l | ) | [inline] |
| unsigned long int Gecode::Search::TimeStop::limit | ( | void | ) | const [inline] |
| void Gecode::Search::TimeStop::limit | ( | unsigned long int | l | ) | [inline] |
| void Gecode::Search::TimeStop::reset | ( | void | ) | [inline] |
| bool Gecode::Search::TimeStop::stop | ( | const Statistics & | s, |
| const Options & | o | ||
| ) | [virtual] |
Return true if time limit is exceeded.
Implements Gecode::Search::Stop.
Support::Timer Gecode::Search::TimeStop::t [protected] |
unsigned long int Gecode::Search::TimeStop::l [protected] |