- bool operator<(const std::string & rvalue) const { return login < rvalue; };
- time_t lastAlive;
-};
-
-class IsNotTimedOut : public std::unary_function<const AliveData &, bool> {
- public:
- explicit IsNotTimedOut(double to) : timeout(to), now(time(NULL)) {}
- bool operator()(const AliveData & data) const
- {
- return difftime(now, data.lastAlive) < timeout;
- }
- private:
- double timeout;
- time_t now;