Article View: comp.sys.amiga.tech
Article #11878alarm() function
From: Sam Paolucci
Date: Fri, 17 Mar 1989 16:09
Date: Fri, 17 Mar 1989 16:09
25 lines
1364 bytes
1364 bytes
Has anybody written a Unix compatible alarm() function on the amiga. For
those not familiar, and to be more specific, its definition is
int alarm(seconds) unsigned seconds; { }
The function sends a signal ( SIGALRM, defined in signal.h and trapped by
(*signal())() ) to the invoking process after the number of seconds indicated
in the argument has elapsed. Unless the signal is caught or ignored, the
signal terminates the process.
Successive alarm() calls reinitialize the alarm clock. In other words,
alarms are not stacked, and calling alarm() with a zero argument cancels
any pending alarms.
Also, the function should return the number of seconds remaining from a
previous alarm request.
I actually don't care whether it has been written with Lattice or Manx.
I need it for something I'm working on, but I though it might be a
function which may me of much more general usefulness.
--
-+= SAM =+-
"the best things in life are free"
ARPA: paolucci@snll-arpagw.llnl.gov
Technical Details
Message-ID:
<70@snll-arpagw.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!snll-arpagw!paolucciShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!snll-arpagw!paolucci From: paolucci@snll-arpagw.UUCP (Sam Paolucci) Newsgroups: comp.sys.amiga.tech Subject: alarm() function Message-ID: <70@snll-arpagw.UUCP> Date: 17 Mar 89 16:09:05 GMT Reply-To: paolucci@snll-arpagw.UUCP (Sam Paolucci) Organization: Sandia National Labs, Livermore, CA Lines: 25