OCTimer - Global

The OCTimer API provides the ability to track the length of time it takes for a function to complete.

OCTimer - log (String name, String entry)

Logs the entry based on the function name.

Table 1. Parameters
Name Type Description
name String Function name.
entry String Text that will be part of the output in the log.
Table 2. Returns
Type Description
void

OCTimer - millisToTime (Integer millis)

Takes a milisecond value and returns a formatted duration.

Table 3. Parameters
Name Type Description
millis Integer Duration in miliseconds.
Table 4. Returns
Type Description
String A formatted duration.

OCTimer - result ()

Calculates the time taken for each function registered.

Table 5. Parameters
Name Type Description
None
Table 6. Returns
Type Description
String Time taken for each function registered.

OCTimer - start (String name)

Initializes a timer based on the name provided.

Table 7. Parameters
Name Type Description
name String Function name.
Table 8. Returns
Type Description
void

OCTimer - stop (String name)

Registers the end of the timer for the provided name.

Table 9. Parameters
Name Type Description
name String Function name.
Table 10. Returns
Type Description
void