Update Event
Add API: Event.wait
update internal api
New Class: Event::Timer
Add API: Event.flush
update gameloop