Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The thread running
- timer_thread_ = std::thread([this] {
- duration_t prev = duration_t::zero();
- while (true) {
- timer_evt_manager_.wait_until_push();
- if (timer_evt_manager_.wait_for(prev)) continue;
- timer_evt_manager_.execute_next_in_line();
- }
- });
- // Dispatching events (never called in code though)
- void EventManager::dispatch_as_timer_event(const std::string& evt_name, const duration_t nsec) {
- timer_evt_manager_.dispatch_timer_event(TimerEventFunction{scene_.get().registered_events().at(evt_name), nsec});
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement