Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ualarm(3) [bsd man page]

UALARM(3)						     Library Functions Manual							 UALARM(3)

ualarm - schedule signal after specified time SYNOPSIS
unsigned ualarm(value, interval) unsigned value; unsigned interval; DESCRIPTION
This is a simplified interface to setitimer(2). Ualarm causes signal SIGALRM, see signal(3C), to be sent to the invoking process in a number of microseconds given by the value argument. Unless caught or ignored, the signal terminates the process. If the interval argument is non-zero, the SIGALRM signal will be sent to the process every interval microseconds after the timer expires (e.g. after value microseconds have passed). Because of scheduling delays, resumption of execution of when the signal is caught may be delayed an arbitrary amount. The longest speci- fiable delay time (on the vax) is 2147483647 microseconds. The return value is the amount of time previously remaining in the alarm clock. SEE ALSO
getitimer(2), setitimer(2), sigpause(2), sigvec(2), signal(3C), sleep(3), alarm(3), usleep(3) NOTES (PDP-11) On the PDP-11, setitimer(2) rounds the number of microseconds up to seconds resolution, therefore ualarm doesn't give you any more resolu- tion than alarm(3). 4.3 Berkeley Distribution August 26, 1988 UALARM(3)

Check Out this Related Man Page

ualarm(3C)						   Standard C Library Functions 						ualarm(3C)

ualarm - schedule signal after interval in microseconds SYNOPSIS
#include <unistd.h> useconds_t ualarm(useconds_t useconds, useconds_t interval); DESCRIPTION
The ualarm() function causes the SIGALRM signal to be generated for the calling process after the number of real-time microseconds speci- fied by the useconds argument has elapsed. When the interval argument is non-zero, repeated timeout notification occurs with a period in microseconds specified by the interval argument. If the notification signal, SIGALRM, is not caught or ignored, the calling process is ter- minated. Because of scheduling delays, resumption of execution when the signal is caught may be delayed an arbitrary amount of time. Interactions between ualarm() and either alarm(2) or sleep(3C) are unspecified. RETURN VALUES
The ualarm() function returns the number of microseconds remaining from the previous ualarm() call. If no timeouts are pending or if ualarm() has not previously been called, ualarm() returns 0. ERRORS
No errors are defined. USAGE
The ualarm() function is a simplified interface to setitimer(2), and uses the ITIMER_REAL interval timer. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
alarm(2), setitimer(2), sighold(3C), signal(3C), sleep(3C), usleep(3C), attributes(5), standards(5) SunOS 5.11 14 Aug 2002 ualarm(3C)
Man Page

7 More Discussions You Might Find Interesting

1. Programming

setitimer expires in wrong time

I set a timer using setitimer to expire every 30 ms. Usually it does. But sometimes it takes ~ 700 ms between 2 successive arousals (expirations). The timing is crucial for me. The process with the timer is almost the only one running on the computer. How do I overcome this problem? (1 Reply)
Discussion started by: inna
1 Replies

2. Shell Programming and Scripting

Perl alarm signal

I am trying to write a signal to exit when a process times out. What I have come up with from poking around the web is this. #!/usr/bin/perl eval { local $SIG{ALRM} = sub { die "alarm clock restart" }; alarm 10; open(DSMADMC, "dsmadmc -se=tsmpc1 -id=XXXXX... (2 Replies)
Discussion started by: reggiej
2 Replies

3. Programming

Runaway SIGALRM signal handler

I have written a program to demonstrate a problem I have encountered when using BSD style asynchronous input using the O_ASYNC flag in conjunction with a real time interval timer sending regular SIGALRM signals to the program. The SIGIO handler obeys all safe practices, using only an atomic update... (8 Replies)
Discussion started by: stewartw
8 Replies

4. Programming

signal handling question

Hello all, I am starting to learn signal handling in Linux and have been trying out some simple codes to deal with SIGALRM. The code shown below sets a timer to count down. When the timer is finished a SIGALRM is produced. The handler for the signal just increments a variable called count. This... (7 Replies)
Discussion started by: fox_hound_33
7 Replies

5. Programming

Query on signal delay

Hi I have used setitmer function in C to notify the occurence of an event . setitimer function generates a SIGLALRM signal which I handled through a defined handler using signal system call. There are multiple processes running and using this handler to handler the SIGALRM . The handler is... (1 Reply)
Discussion started by: anktim
1 Replies

6. UNIX for Dummies Questions & Answers

Need help regarding cronjob scheduling

Hello All, I have three requirements to schedule three shell scripts in crontab. Could you please help me in this: 1) To schedule a shell script every 5mins interval every day between 10PM to 10:30PM 2) To schedule a shell script every 10min interval every day between 9AM to 10AM. 3) To... (6 Replies)
Discussion started by: abhi_123
6 Replies

7. BSD

BSD for PDP-11/34a?

In the process of restoring a few DEC PDP-11/34's (34a, and 34). Curious what BSD versions will run on the 34 (if any). It looks like 1BSD or 2BSD might run on it, but not sure. Curious if anyone knows, or has done this. (1 Reply)
Discussion started by: xenix
1 Replies