is it possible to record how long phantom processes take

General discussion about the Phantom Automation Language and related tools.

is it possible to record how long phantom processes take

Postby nyehus on Wed May 29, 2013 2:46 pm

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
nyehus
 
Posts: 1
Joined: Wed May 29, 2013 2:34 pm

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

Postby phantom on Thu May 30, 2013 4:44 pm

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
User avatar
phantom
 
Posts: 5
Joined: Wed Apr 22, 2009 12:30 pm


Return to Phantom

Who is online

Users browsing this forum: No registered users and 14 guests

cron