traltixx Posted December 13, 2009 Share Posted December 13, 2009 Hi, I'm trying to get the current time and add x milliseconds to it like this: #include <Date.au3> #include <Array.au3> #include <IE.au3> $time_sleep = 2260000 $tCur = _Date_Time_GetLocalTime() $wake_at = _Date_Time_GetLocalTime() + $time_sleep ConsoleWrite("Now " & _Date_Time_SystemTimeToDateTimeStr($tCur) & " Then is " & _Date_Time_SystemTimeToDateTimeStr($wake_at) & @CRLF) But this doesn't work. What am I doing wrong here? Link to comment Share on other sites More sharing options...
picaxe Posted December 13, 2009 Share Posted December 13, 2009 Try#include <Date.au3> $time_sleep = 2260000 $sCur = _NowCalc() $wake_at = _DateAdd("s", $time_sleep/1000, $sCur) ConsoleWrite("Now " & $sCur & " Then is " & $wake_at & @CRLF) Link to comment Share on other sites More sharing options...
traltixx Posted December 13, 2009 Author Share Posted December 13, 2009 Try#include <Date.au3> $time_sleep = 2260000 $sCur = _NowCalc() $wake_at = _DateAdd("s", $time_sleep/1000, $sCur) ConsoleWrite("Now " & $sCur & " Then is " & $wake_at & @CRLF) Thanks a bunch! That worked! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now