Higher Resolution Timing

Louis S.
White Plains, NY

Jun 16, 2011
13 Posts

0  |  0  

Re: Higher Resolution Timing

I have used the following pattern in past projects to determine the time required until a condition is met:

start_time = Now()
while condition_state <> true
    if (time_difference(start_time,Now()) > timeout) then exitloop
endwhile
end_time = Now()

TestResult = time_difference(start_time, end_time)

However, since Datetime operates on intervals of 1 second (I think), that is the maximum resolution I can achieve.  Does anyone know a relatively simple method to time events at a higher resolution?

Thanks,
Louis

Solution Available
DrATEasy (Ron Y.)
Mission Viejo, CA

Jun 16, 2011
358 Posts

1  |  0  

Re: Higher Resolution Timing

Use the Tick() function. it is accurate to 1msec.

Louis S.
White Plains, NY

Jun 16, 2011
13 Posts

0  |  0  

Re: Higher Resolution Timing

Got it, thanks!



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]