www.delorie.com/djgpp/doc/libc-2.02/libc_39.html   search  
Go to the first, previous, next, last section, table of contents.


alarm

Syntax

#include <unistd.h>

unsigned alarm(unsigned seconds);

Description

This function causes the signal SIGALRM to be raised in seconds seconds. A value of zero for seconds cancels any pending alarm. If an alarm has previously been set, the new alarm delay will superceed the prior call.

Return Value

The number of seconds remaining on the timer (i.e. always seconds).

Portability

not ANSI, POSIX

Example

signal(SIGALRM,my_alarm_routine);
alarm(5);


Go to the first, previous, next, last section, table of contents.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 1998   by DJ Delorie     Updated Dec 1998  

Please take a moment to fill out this visitor survey
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)