Jump to content
Sign in to follow this  

Time functions

Recommended Posts


I ran into a situation where I needed to set the system clock ahead, and did some poking around. At another time, I needed a delay function that would work on multiprocessor machines (has that happened to anyone else?). Finally, I decided to put it all together. Enjoy.

Depending mostly on

MSDN documentaion


Consolewrite($t1 & @crlf)

API_SetLocalTime(+5, "hours") ; set clock forward five hours

API_SetLocalTime(-3, "days") ; set clock back three days

API_SetLocalTime("2006:8:2:29:15:46:55:521") ; set to a specific time (yyyy:month:dayofweekisignored:dayofmonth:hourofday:minute:second:millisecond)



_TimeDelayUpToMS(10000, "MouseAt00()")

; just a sample function that returns a 0 or 1
Func MouseAt00() ; As Boolean
    If MouseGetPos(0) + MouseGetPos(1) = 0 then Return 1
    Return 0

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.