Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

sleep() Function (SLAX and XSLT)

Namespaces

SLAX Syntax

XSLT Syntax

Description

Cause the script to pause for a specified number of seconds and (optionally) milliseconds. You can use this function to help determine how a device component works over time. To do this, write a script that issues a command, calls the jcs:sleep() function, and then reissues the same command.

The prefix associated with the namespace URI should be defined in the prefix-to-namespace mapping in the style sheet.

Parameters

milliseconds

(Optional) Number of milliseconds the script should sleep.

seconds

Number of seconds the script should sleep.

Usage Examples

In the following example, jcs:sleep(1) causes the script to sleep for 1 second, and jcs:sleep(0, 10) causes the script to sleep for 10 milliseconds:

SLAX syntax:

XSLT syntax:

Release Information

Function introduced in Junos OS Release 7.6.

Support for the slax namespace http://xml.libslax.org/slax added in Junos OS Release 12.2.