Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All
     

    Related Documentation

     

    sleep() Function (jcs and slax Namespaces)

    Namespaces

    http://xml.juniper.net/junos/commit-scripts/1.0http://xml.libslax.org/slax

    SLAX Syntax

    expr prefix:sleep(seconds, <milliseconds>);

    XSLT Syntax

    <xsl:value-of select="prefix:sleep(seconds, <milliseconds>)"/>

    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.

    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:

    expr jcs:sleep(1);
    expr jcs:sleep(0, 10);

    XSLT syntax:

    <xsl:value-of select="jcs:sleep(1)"/>
    <xsl:value-of select="jcs:sleep(0, 10)"/>
     

    Related Documentation

     

    Published: 2013-03-05