getTimer

Used to get the amount of time in milliseconds that has passed since the Script module was loaded.


Availability:

First available in version 3.0 build 2039.


Usage:

time = getTimer()

time - Number - Time in milliseconds.


Parameters:

None.


Notes:

This is not the same value as what getTimer in the main movie would return, as it is the time that has passed since the Script was loaded. The getTimer within ActionScript returns the amount of time that has passed since the SWF was loaded.


Examples:

Example 1:
In this example we capture the time before we call a function and then display the difference between the current time and the captured time to show how long the process takes.

var timer = getTimer();
files_array = getFiles();
trace(getTimer() - timer);