Extract clock.
Use Node's EventEmitter instead of homebrew event system.