Hacker News new | ask | show | jobs
by catechu 5673 days ago
How can you check if nothing happened?
1 comments

By changing some global variable in the callback and checking if it has changed in 'somethinghappened' (which only gets called after 5 seconds, giving the callback time enough to get called).