sleep, usleep

Gamma: Version 4.0
Prev |  | Next

# `sleep`, `usleep`

`sleep`, `usleep` -- suspend execution.

## Syntax

    sleep (seconds)
    usleep (microseconds)

## Arguments

`seconds`

  The integer number of seconds to sleep.

`microseconds`

  The integer number of microseconds to sleep.

## Returns

t

## Description

These functions suspend execution for the given number of seconds or microseconds, after which time the task continues. Signals and timers will still be processed during this time.

## Example

        Gamma> sleep (3);

        (after 3 seconds...)

        t
        Gamma> usleep (500000);

        (after 1/2 second...)

        t
        Gamma>

See the Starting qserve and nserve section of the Common Functions chapter (Tutorial One) in the Cogent Tools Demo and Tutorials book for an example of the `usleep` function used in context.

## See Also

`nanosleep`

Prev | Home | Next
`signal` | Up | `strerror`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.