Emit events with setTimeout
Added JSDoc