Pause

<< Click to Display Table of Contents >>

Navigation:  Reference (Scripting) > Docklight Script Commands - The DL Object > Methods >

Pause

Pauses the script's execution for a specified number of milliseconds.

 

Return Value

 

Void

 

Syntax

 

DL.Pause milliseconds

 

The Pause method syntax has these parts:

 

Part

Description

milliseconds

Required. Long value for the delay in milliseconds.

Minimum value is 0 (Pause returns immediately).

Maximum value is 86000000 (23.88 hours).

 

Remarks

 

Docklight in general and the Pause function do not provide a very exact timing with milliseconds precision, so the actual delay may vary from the milliseconds value.

 

During a Pause, no DL_OnReceive() procedure calls can be processed. If you need to process DL_OnReceive() events while waiting, see the pauseWithEvents() code described at Example 2.

 

Example

 

' Example Pause

 

' Send a test command

DL.SendSequence "Test1"

' 5 seconds delay

DL.Pause 5000

' Send another command

DL.SendSequence "Test2"

 

' Typical main loop for processing data

Do

  DL.Pause 1 ' reduce CPU load

  countSomeThings = DL.GetReceiveCounter(1)

  ' ... do more things ...

Loop