Page 1 of 1

is it possible to record how long phantom processes take

PostPosted: Wed May 29, 2013 2:46 pm
by nyehus
Hello,

I am evaluating Phantom to replace an existing product that I am using -(but it only supports up to windows xp :( ), this product runs a script and matches bitmaps/text etc
enters commands
logs into pages etc

each section saves the amount of time (in seconds) taken to complete, this data is then passed to a database, from which reports/graphs are created

is Phantom able to record/count seconds taken and then save this data? ( I have read all of the Help files, but cannot find anything relevant or I am being daft :roll: )

regards
rob

Re: is it possible to record how long phantom processes take

PostPosted: Thu May 30, 2013 4:44 pm
by phantom
Hello-

You may be able to use Phantom's 'clock' function. This returns the number of seconds elapsed between consecutive clock() calls. Passing '1' to clock resets the timer. Passing '0' retrieves the current timer value:

Code: Select all
1 >>clock(1);
2 >>disp("Hi");
Hi
3 >>disp(clock(0));
9.90500000000000
4 >>disp(clock(0));
12.10800000000000
5 >>disp(clock(1));
0.00000000000000
6 >>disp(clock(0));
2.50400000000000


Clock returns a 'real' (floating point), so you could write that to a file. Start the clock timer, run your process, and when it finishes retrieve the clock value.

I hope this helps!

-John