Design Pattern Examples
Overview of object-oriented design patterns
sleep.c File Reference

Implementation of the sleep() function, for sleeping for a number of milliseconds. More...

#include <stdlib.h>
#include <unistd.h>
#include "sleep.h"
Include dependency graph for sleep.c:

Go to the source code of this file.

Functions

void sleep (int milliseconds)
 Sleep for the specified number of milliseconds. Does not return until after the sleep period.
 

Detailed Description

Implementation of the sleep() function, for sleeping for a number of milliseconds.

Copied from https://stackoverflow.com/questions/1157209/is-there-an-alternative-sleep-function-in-c-to-milliseconds#answer-28827188

Definition in file sleep.c.

Function Documentation

◆ sleep()

void sleep ( int  milliseconds)

Sleep for the specified number of milliseconds. Does not return until after the sleep period.

Parameters
millisecondsNumber of milliseconds to sleep.

Definition at line 21 of file sleep.c.

References sleep().

Referenced by Flyweight_Exercise(), and sleep().