views:

54

answers:

1

How is a function called after a time has passed implemented in javascript or any other interpreted language?

In other words, is there a loop behind in the javascript interpreter that checks all the time a list of timers, or is there any particular way that the operating systems handle this?

Thanks

A: 

You could look at the source of Firefox or WebKit to see how they implemented it.

Sam Hasler
Yes. But actually I want to know if there is a general approach that could be used in any language.
alvatar

related questions