Contents

setInterval

Repeatedly executes a given function at the given time interval.

Declaration

String setInterval(
    in Function func, 
    in Integer time
);

Parameters

  • func:

    The function to be executed.

  • time:

    An integer value that defines, in milliseconds, how often the function is to repeat.

Return Value

Returns a string containing an identifier for the interval just set.

Discussion

Pass the identifier created by this function to the clearInterval function to stop the designated function from executing.

See Also

Automating Function Timing