From iMacros
Jump to: navigation, search

Returns the data of the STOPWATCH command. If there is no STOPWATCH command in the macro then iimGetStopwatch returns only one value ("Total Runtime").

Syntax iMacros Browser IE Plug-in Firefox Chrome

Int ret = iimGetStopwatch ( int index, string name, string value)


in: index: The index of the measurement to get

out: name: The name of the STOPWATCH label

out: value: The performance measurement

The return value is 1 if a value exits for a given index, or -1 if no data is available.


iimGetStopwatch (1, name, value ) - returns 1st measurement, which is always the total runtime

iimGetStopwatch (2, name, value ) - returns 2nd measurement, if you have a STOPWATCH command in the macro (and so on)


Display the stopwatch data from a macro (Visual Basic Script example):

 'Get stopwatch values
 Dim name, value,i
 i = 1
 s = "Performance Data"+vbcrlf+vbcrlf
    iret = iim1.iimGetStopwatch (i, name, value)
    if iret > 0 then s = s + "Label: "+name + " --> "+ value + " s"+vbcrlf
    i = i+1
 loop while iret > 0
 MsgBox s

See Also

STOPWATCH, Get-Response-Times.vbs