|
vbscript to calculate processing time Jay [5 posts] |
15 year
|
Good afternoon,
I am tinkering with an application requiring me to know the time to process an image. In the script module i have come up with;
CurrentTime = GetStrVariable("IMAGE_TIME")
ProcessingTime = CurrentTime - PreviousTime
SetVariable "ProcessingTime", ProcessingTime
PreviousTime = CurrentTime
this works but produces incorrect + inconsistent times ranging from correct to 7 seconds over.
i believe that the problem i when it is doing the automatic conversion from string to int for the math.
any help in solving this or maybe offering a different idea as to how to calculate processing time would be appreciated.
Thanks for yourr time.
Jay
ps stupid question but is their a DebugPrint command built into the script module?
|
|
|
Anonymous |
15 year
|
Jay,
Not sure about the inconsistent timing but compare your results to the new PROCESS_TIME variable that was added into the latest version (you will have to download RR again). See if the times match somewhat or if the PROCESS_TIME works for your purposes.
As far as the DebugPrint you can use "write" as in
write "hello" & vbCRLF
to print out a message in the VBScript module for debugging purposes.Note that the vbCRLF causes a newline in that printing.
Or were you looking for the system debug print as is sometimes used in kernal type debuggin?
STeven.
|
|