jsleep(int milliseconds) is a keyword since it is not bound to any particular objects. You can use it anywhere in the code and it will just wait for the specified number of milliseconds. You can easly test it by doing the following:
print ("Start\n"); jsleep(2000); print ("end\n");
If you copy and paste the above script in the input console window and run it by selecting all of it and pressing enter you will see that two seconds will pass between the first Start and End.