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)



SLAX Syntax

XSLT Syntax

Release Information

Function introduced in Junos OS Release 7.6.

Support for the slax namespace added in Junos OS Release 12.2.


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.


milliseconds(Optional) Number of milliseconds the script should sleep.
secondsNumber 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: