If you want to use JavaScript...
Make a variable that records the current time.
var currentTime = timeMS;
Then, make a variable that measures how much time has passed since the current time.
var passedTime = timeMS - currentTime;
Finally, create an if-statement where if the time passed is a second, the action is executed. Remember that 1 millisecond = 1000 seconds (milli = 1/1000) so multiply the time you need by 1000.
if (passedTime == 1 * 1000) { //statements }
When you put it all together:
var currentTime = timeMS; var passedTime = timeMS - currentTime;
if (passedTime == 1 * 1000) { //statements }
|