delorie.com/djgpp/doc/libc/libc_844.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

usleep

Syntax

 
#include <unistd.h>

unsigned usleep(unsigned usec);

Description

This function pauses the program for usec microseconds. Note that, since usleep calls clock internally, and the latter has a 55-msec granularity, any argument less than 55msec will result in a pause of random length between 0 and 55 msec. Any argument less than 11msec (more precisely, less than 11264 microseconds), will always result in zero-length pause (because clock multiplies the timer count by 5). See section clock.

Return Value

The number of unslept microseconds (i.e. zero).

Portability

ANSI/ISO C No
POSIX No

Example

 
usleep(500000);


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004