Sponsored Content
Full Discussion: unix and timers
Top Forums Programming unix and timers Post 27608 by nightcat on Wednesday 4th of September 2002 09:49:02 AM
Old 09-04-2002
unix and timers

Hello there.. I need to know when i start indipendant
timers how can i recognize which of the active timers
have made timeout alarm.
The number of started timers depends on the running app
I'd appreciate your help
Thanks in advance
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX problem? Unix programm runs windows 2000 CPU over 100%

Okee problems...!! What is happening: Unix server with some programms, workstations are windows 2000, the workstations work good but when you start a programm on the Unix server the CPU of the workstations go to 100% usage resulting that the system gets very slow. The programm well its running so... (2 Replies)
Discussion started by: zerocool
2 Replies

2. UNIX for Advanced & Expert Users

missing Path(in UNIX) when i launch a job on to unix machine using windows SSh

hi i want run an unix application from a windows program/application.i am using SSH(command line version)to log on to a unix machine from windows. the application has to read a configuration file inorder to run. the configuration file .CFG is in bin in my home directory. but the application... (1 Reply)
Discussion started by: megastar
1 Replies

3. Shell Programming and Scripting

FTP script for sending a file from one unix directory to another unix server director

Hi, My local server is :/usr/abcd/ Remote server is :/Usr/host/test/ I want to send files from local unix directory(All files starting with O_999) to remote host unix directory. Can any body give me the Unix Shell script to do this. One more doubt: Shall we need to change the file... (1 Reply)
Discussion started by: raja_1234
1 Replies

4. Programming

Doubts about timers in linux kernel

Hi , I am trying to learn timers in linux kernel. I am trying to write a program where I can configure a timer to tick in every 5 seconds and a function should thus exicute in every five seconds. I tried one program with the help of linux/timer.h headerfile but I couldnt get the... (4 Replies)
Discussion started by: iamjayanth
4 Replies

5. Shell Programming and Scripting

Batch job in unix server to move the pdf file from unix to windows.

Hi Experts, I have a requirement where i need to setup a batch job which runs everymonth and move the pdf files from unix server to windows servers. Could some body provide the inputs for this. and also please provide the inputs on how to map the network dirve in the unix like that... (1 Reply)
Discussion started by: ger199901
1 Replies

6. Programming

pthread_mutex_timedlock and Timers option

in its man-page pthread_mutex_timedlock documents that the absolute timeout parameter should be based on the CLOCK_REALTIME clock or in the system clock. All this depending on whether the 'Timers option' is supported or not. What do they mean by 'Timers option'? How could I tell for sure what... (8 Replies)
Discussion started by: ramestica
8 Replies

7. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

8. Shell Programming and Scripting

A Question Regarding Timers and Output

Hi there. I am fairly new to scripting in BASH so please forgive my clumsy syntax and analogy as I try to explain what I am trying to accomplish. I have a list of mundane functions that I currently call from a script file. What I wish to do is to accurately record into a log file the times that... (17 Replies)
Discussion started by: Tenuous
17 Replies

9. Shell Programming and Scripting

File Transfer from Window server to UNIX and UNIX to UNIX

Dear All, Can someone help to command or program to transfer the file from windows to Unix server and from one unix server to another Unix server in secure way. I would request no samba client. (4 Replies)
Discussion started by: yadavricky
4 Replies
getitimer(2)							System Calls Manual						      getitimer(2)

NAME
getitimer(), setitimer() - get and set value of interval timer SYNOPSIS
DESCRIPTION
The function stores the current value of the timer specified by which into the structure pointed to by value. The function sets the timer specified by which to the value specified in the structure pointed to by value, and if ovalue is not a null pointer, stores the previous value of the timer in the structure pointed to by ovalue. The header declares the structure: If it_value is non-zero, it indicates the time to the next timer expiration. If it_interval is non-zero, it specifies a value to be used in reloading it_value when the timer expires. Setting it_value to 0 disables the timer, regardless of the value of it_interval. Setting it_interval to 0 disables the timer after its next expiration (assuming it_value is non-zero). Implementations may place limitations on the granularity of timer values. For each interval timer, if the requested timer value requires a finer granularity than the implementation supports, the actual timer value will be rounded up to the next supported value. Timer values smaller than the resolution of the system clock are rounded up to this resolution. The machine-dependent clock resolution is seconds, where the constant is defined in To make sure that a process gets at least as much time as requested, the timer value is rounded up to the next timer tick (a timer tick is the smallest supported value). The timer value is rounded up to the next timer tick, because the timer may be initialized somewhere between timer ticks. If a is followed by a without a timer tick in between, it is possible that the value returned by may be more than the initial value requested by due to this rounding. Implementations may place limitations on the timer value. Timer values larger than an implementation-specific maximum value are rounded down to this maximum. The maximum values for the three interval timers are specified by the constants and defined in On all implementa- tions, these values are guaranteed to be at least 31 days (in seconds). An XSI-conforming implementation provides each process with at least three interval timers, which are indicated by the which argument: Decrements in real time. A signal is delivered to the process when this timer expires. Decrements in process virtual time. This timer runs only when the process is executing. A signal is delivered to the process when the timer expires. Decrements both in process virtual time and when the system is running on behalf of the process. This timer is designed to be used by interpreters in sta- tistically profiling the execution of interpreted programs. Each time the timer expires, a signal is delivered to the process. In addition to the above timers, HP-UX provides the following three per-thread interval timers for threads, which are indicated by the which argument: Decrements in real time. A signal is delivered to the thread which set this timer when the timer expires. Decrements in thread virtual time. This timer runs only when the thread is executing. A signal is delivered to the thread which set this timer when the timer expires. Decrements both in thread virtual time and when the system is running on behalf of the thread. Each time the timer expires, a signal is delivered to the thread which set this timer. Since a signal can interrupt in-progress system calls, programs using this timer must be prepared to restart the interrupted system call. Interval timers are not inherited by a child process across a but are inherited across an Three macros for manipulating time values are defined in Set a time value to zero. Test if a time value is non-zero. Compare two time values. (Beware that and do not work with the macro.) The timer used with is also used by (see alarm(2)). Thus successive calls to and set and return the state of a single timer. In addition, a call to sets the timer interval to zero. The interaction between and any of or is unspecified. RETURN VALUE
Upon successful completion, or returns 0. Otherwise, -1 is returned and is set to indicate the error. ERRORS
The function will fail if: The value argument is not in canonical form. (In canonical form, the number of microseconds is a non-negative integer less than 1,000,000 and the number of seconds is a non-negative integer.) The and functions may fail if: The which argument is not recognized. The value structure specified a bad address. Reliable detection of this error is implementation dependent. EXAMPLES
The following call to sets the real-time interval timer to expire initially after 10 seconds and every 0.5 seconds thereafter: AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
alarm(2), exec(2), ualarm(2), usleep(2), pthread_attr_setscope(3T), pthread_create(3T), pthread_sigmask(3T), sleep(3C), signal(5). CHANGE HISTORY
First released in Issue 4, Version 2. getitimer(2)
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy