bool check() { if(active) { if(!time_left()) { if(!callback.empty()) { callback(); callback.clear(); } active = false; return true; } } return false; }
void cancel() { active = false; callback.clear(); }