Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ualarm(3) [bsd man page]

UALARM(3)						     Library Functions Manual							 UALARM(3)

NAME
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(3)						   BSD Library Functions Manual 						 UALARM(3)

NAME
ualarm -- schedule signal after specified time LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> useconds_t ualarm(useconds_t useconds, useconds_t interval); DESCRIPTION
This is a simplified interface to setitimer(2). The ualarm() function waits a count of useconds before asserting the terminating signal SIGALRM. System activity or time used in processing the call may cause a slight delay. 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 useconds number of microseconds have passed). Due to a setitimer(2) restriction, the maximum number of useconds and interval is limited to 100,000,000,000,000 (in case this value fits in the unsigned integer). RETURN VALUES
When the signal has successfully been caught, ualarm() returns the amount of time left on the clock. NOTES
A microsecond is 0.000001 seconds. SEE ALSO
getitimer(2), setitimer(2), sigpause(2), sigvec(2), alarm(3), signal(3), sleep(3), usleep(3) HISTORY
The ualarm() function appeared in 4.3BSD. BSD
April 19, 1994 BSD
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