Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

SwyxPEDIA

Bookmark and Share

SwyxPEDIA

Bookmark and Share

PBXScript.Sleep


This function stops the execution of the current script for the given number of miliseconds.

 

PBXScript.Sleep 1000

 

This function returns an integer value of  PBXSuccess (0) on success. See list of defined return values.

The numeric parameter gives the number of miliseconds to "sleep".

This function is used to wait a certain amount of time without consuming cpu load. A common usage is e.g. in a call queue to check every second for the availability of a free agent. While "sleeping" one second no cpu load is used.

When ever you need to loop witihn your script make sure to use this function to slow the execution of the loop down and save cpu load.

An endless loop, like

While True
  i = i + 1
Wend

will drive the cpu load of the server machine to 100% and definately interfere negatively with the all calls on and other activities of the SwyxServer.

 

 

Server Script API

 

You might also be interested in the following articles:

GSE build in functions
VBScript build in functions




 | View Topic History  |

 

SwyxPEDIA Help
Sponsors