Measuring Time Elapsed

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
fightcancer
Macro Veteran
Posts: 260
Joined: Fri Apr 15, 2005 8:32 am

Measuring Time Elapsed

Post by fightcancer » Wed Sep 30, 2009 6:42 am

I keep time stamps on my orders with:

GetTime>vTime
GetDate>vDate
Let>TimeStamp=%vDate% %vtime%

Then I log it to a file with EditIniFile>. I don't want to check orders more than once every 5 min. Is there an easy way to code whether 5 min. has elapsed? If not, I'll use Midstr and Pos to dig out the numbers. Just wondering if anyone's already written a simple script and posted it. Thanks.

Nevermind, I think this thread will get me started.
http://www.mjtnet.com/forum/viewtopic.p ... ht=gettime

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Sep 30, 2009 7:56 am

Yes. Use VBScript's Timer function.

Code: Select all

VBSTART
VBEND

VBEval>Timer,startTime

.. do something

VBEval>Timer-%startTime%,secondsElapsed
MessageModal>seconds elapsed: %secondsElapsed%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

fightcancer
Macro Veteran
Posts: 260
Joined: Fri Apr 15, 2005 8:32 am

Post by fightcancer » Wed Sep 30, 2009 8:15 am

Very helpful! Ty.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts