ALPSCore reference
Public Member Functions | List of all members
alps::simple_time_callback Class Reference

Functor-predicate: is it time to stop? More...

#include <stop_callback.hpp>

Collaboration diagram for alps::simple_time_callback:
Collaboration graph

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

alps::simple_time_callback::simple_time_callback ( std::size_t  timelimit)

Initializes the functor with the desired time duration.

Parameters
timelimitTime limit (seconds); 0 means "indefinitely"

Definition at line 41 of file stop_callback.cpp.

Member Function Documentation

bool alps::simple_time_callback::operator() ( ) const

Returns true if time is up.

Definition at line 46 of file stop_callback.cpp.


The documentation for this class was generated from the following files: