Forum Discussion
Anonymous
14 years agoHi Lee,
You can use the aqDateTime object to work with the date and time values. Please refer to the aqDateTime Object Methods article to see all available methods.
How can i get the local system date and time...
I recommend that you use the aqDateTime.Now method.
...and perform some action after the predefined time is reached?
You can act in the following way to accomplish your task:
1. Get the current time value by using the aqDateTime.Time method.
2. Set the target time value by using the aqDateTime.SetTimeElements method.
3. Compare these two time values via the aqDateTime.Compare method.
Please see the sample script below:
//Compares the current time value and the target one (e.g. 10:00:00)
while (aqDateTime.Compare(aqDateTime.Time(), aqDateTime.SetTimeElements(10, 00, 00)) == -1) {
}
//When the target time value is reached, you can continue the test execution
Log.Message("The predefined time is reached");
Also, please refer to the "Working With Time" article - it may contain the information you need.