www.delorie.com/djgpp/doc/libc-2.01/libc_38.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).

Example

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


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

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997