Event firing


 
Thread Tools Search this Thread
Top Forums Programming Event firing
# 1  
Old 08-24-2001
Event firing

I am writing a program in C.
It is kind of a daemon process.
In this program, at the end of every 2 hours,
i need to fire an event. How can i achieve this
timer effect in my program?
# 2  
Old 08-24-2001
Quote:
getitimer, setitimer (2) - get or set value of an interval timer
Quote:
NAME
getitimer, setitimer - get or set value of an interval
timer

SYNOPSIS
#include &lt sys/time.h &gt

int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval *value,
struct itimerval *ovalue);

DESCRIPTION
The system provides each process with three interval
timers, each decrementing in a distinct time domain. When
any timer expires, a signal is sent to the process, and
the timer (potentially) restarts.

ITIMER_REAL decrements in real time, and delivers
SIGALRM upon expiration.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. War Stories

Firing someone for making a mistake, is this a de-motivator?

Would you fire this guy? A man appears to have deleted his entire company with one mistaken piece of code. By accidentally telling his computer to delete everything in his servers, hosting provider Marco Marsala has seemingly removed all trace of his company and the websites that he looks... (1 Reply)
Discussion started by: jon80
1 Replies

2. Shell Programming and Scripting

Help to create audit log while firing 'rm' command

Hi, I would like to get the audit log with username, directory and the date whenever user fires 'rm' command anywhere in the file locations. Is there any possibility to capture the 'rm' command and its parameters from any environment by the single function ? Please advise me. ... (4 Replies)
Discussion started by: Joviac
4 Replies

3. Shell Programming and Scripting

Connecting+Firing plsql to Oracle DB in one go

Hi, I am using the below command to connect to a remote Oracle DB from my unix shell script. sqlplus -s user1/password1@remotedbhost:1252/demo @/tmp/PROC_MS.prc But I get the below error. 1. Can you confirm if my code is correct ? 2. Can you help me overcome the error ? (3 Replies)
Discussion started by: mohtashims
3 Replies

4. Shell Programming and Scripting

Awk Script Is Not Firing

Why is my awk script not firing and how can I confirm? #!/usr/bin/ksh # LU 5 FEB 2007 12:35 OLDDATE=`cat TIMEFILE` for FILE in `find /home/Upload -prune -type f -newer TIMEFILE` do gawk -f convert_sun.awk "/home/Upload/$FILE" done date > TIMEFILE (5 Replies)
Discussion started by: goodmis
5 Replies
Login or Register to Ask a Question