ALPSCore reference
|
Functor-predicate: is it time to stop? More...
#include <stop_callback.hpp>
Public Member Functions | |
simple_time_callback (std::size_t timelimit) | |
Initializes the functor with the desired time duration. More... | |
bool | operator() () const |
Returns true if time is up. More... | |
Functor-predicate: is it time to stop?
The functor is initialized with desired duration, and returns true
when times runs out .
Definition at line 57 of file stop_callback.hpp.
alps::simple_time_callback::simple_time_callback | ( | std::size_t | timelimit | ) |
Initializes the functor with the desired time duration.
timelimit | Time limit (seconds); 0 means "indefinitely" |
Definition at line 41 of file stop_callback.cpp.
bool alps::simple_time_callback::operator() | ( | ) | const |
Returns true
if time is up.
Definition at line 46 of file stop_callback.cpp.