ATEasy Timer Implementation?
John K.

Jun 13, 2011
55 Posts

ATEasy timer implementation?

Hi there! I need some help, please! I have to syncronize some tests so they have to be run after 33 minutes since the program has started. So, on the OnInit() of the program, I have to implement some sort of timer that will counter 33 minutes and run my tests only when this time elapses. I don't know how to do this exactly... I've read something about the ATimer in ATEasy, but I don't know how to implement this so the program will not get stuck while the timer is counting (if I use delay() or sleep() it gets stuck!). Please help me!

Solution Available
Victor B.
Lake Forest, CA

Jun 14, 2011
93 Posts

Re: ATEasy timer implementation?

Hi Alex,

The ATimer control can be added to any form.  You can configure it using the Properties Editor to fire an event every X milliseconds.  The OnTimer() event which is fired can be used to synchronize the execution of your tests.  

I have attached an example.  In the example, two forms are loaded: CountdownForm and MainForm.  The CountdownForm has a countdown variable 'f_lCountdown' which counts down from 10 seconds.  The ATimer control 'tmrCountdown' fires the OnTimer() event every 1000 milliseconds.  When the countdown variable reaches 0, the OnTimer() event calls the form procedure CountdownComplete() which updates the MainForm's label.  Please review the example and feel free to use what you can in your application.

Victor Brode

File Attachment:

John K.

Jun 15, 2011
55 Posts

Re: ATEasy timer implementation?

Thank you very much for your help, Victor! I really appreciate this! Also, I've found the MMTimer example in ATEasy examples directory which uses MMTimer.dll and implements 3 easy-to-use functions so you can make up to 4 timers that work independently in your application. Thanks again for you effort. Have a nice day!

Best regards,
Alex J.

Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]