CRASH: player initial phase missing
[Tsunagari.git] / src / timeout.h
blob750fbc90079921362e040a4660c391b0942f0b2c
1 /****************************
2 ** Tsunagari Tile Engine **
3 ** timeout.h **
4 ** Copyright 2012 OmegaSDG **
5 ****************************/
7 #ifndef TIMEOUT_H
8 #define TIMEOUT_H
10 #include <string>
12 #include <boost/python.hpp>
14 class Timeout {
15 public:
16 Timeout(boost::python::object callback, time_t delay);
17 void cancel();
19 bool isActive() const;
20 bool ready(time_t now) const;
21 time_t readyTime() const;
22 void execute();
24 //! Return a rought string representation of this object.
25 std::string repr() const;
27 private:
28 boost::python::object callback;
29 time_t start, delay;
30 bool active;
33 void updateTimeouts();
34 void exportTimeout();
36 #endif