Delay
Command Description
Continue to execute the following codes after a delay of milliseconds
Command Prototype
Delay(ms)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
ms | True | number | 1000 | Time delay (in ms, 1 sec equals to 1,000 ms) |
Demo
TracePrint("------------------------------------ Delay--------- ----------------------------------")
//-------------------------------------------------------------------------------
//[Remarks] Continue to execute the code after waiting for ms milliseconds
//Input parameter 1:
// ms----->Delay time (milliseconds)
//out parameters:
// None
dTime = Time.Now()
sRet = Time.Format(dTime,"yyyy-mm-dd hh:mm:ss")
TracePrint("The current time is:"&sRet)
Delay(1000)
dTime = Time.Now()
sRet = Time.Format(dTime,"yyyy-mm-dd hh:mm:ss")
TracePrint("After a delay of one second, the current time is "&sRet)