reltimer(3C)reltimer(3C)NAME
reltimer - relatively arm a per-process timer
SYNOPSIS DESCRIPTION
The function sets the of the specified timer to an offset from the current clock setting.
If specifies a value argument with the member equal to zero, the timer is disabled. updates the it_interval value of the timer to the
value specified. Time values smaller than the resolution of the specified timer are rounded up to its resolution; timer values larger than
the maximum value of the specified timer are rounded down to the maximum value (see mktimer(3C)).
returns in the ovalue parameter a value representing the previous amount of time before the timer would have expired or zero if the timer
was disabled, together with the previous interval timer period. The members of ovalue are subject to the resolution of the timer, and are
the same values that would be returned by a call.
The behavior of this function is undefined if value is NULL.
RETURN VALUE
Upon successful completion, returns zero; otherwise, it returns -1 and sets to indicate the error.
ERRORS
fails if any of the following conditions are encountered:
[EINVAL] does not correspond to an ID returned by or the value structure specified a nanosecond value less than zero or greater
than or equal to 1000 million.
[EIO] An error occurred while accessing the clock device.
FILES SEE ALSO timers(2), gettimer(3C), mktimer(3C), thread_safety(5).
STANDARDS CONFORMANCE reltimer(3C)
Check Out this Related Man Page
gettimer(3C)gettimer(3C)NAME
gettimer - get value of a per-process timer
SYNOPSIS DESCRIPTION
The function returns an structure value to the argument. The member of the structure represents the amount of time in the current interval
before the timer expires for the timer specified in or zero if the timer is disabled. The member has the value last set by (see rel-
timer(3C)). The members of are subject to the resolution of the timer (see mktimer(3C)).
The behavior of this function is undefined if is NULL.
RETURN VALUE
Upon successful completion, returns zero; otherwise, it returns -1 and sets to indicate the error.
ERRORS
fails if any of the following conditions are encountered:
[EINVAL] does not correspond to an ID returned by
[EIO] An error occurred while accessing the clock device.
FILES SEE ALSO timers(2), timer_gettime(2), mktimer(3C), reltimer(3C), thread_safety(5).
STANDARDS CONFORMANCE gettimer(3C)
Man Page
15 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Neo,
can u please shorten the reply timer to like 1 min or so. It is prolly just me but i end up passing on replying to posts due to i hate waiting for my timer to reset w/ a 2.5 mins wait. (2 Replies)
Hi all,
Wanted to a create a shell script
-----------------------------------------------------------------------
1) which when called will start a timer and wait for 48 hours.
after 48 hours it will call some function(say XYZ)
2) Whenever this shell script is called (can be called... (3 Replies)
Hi,
Is there a chance that the clock() call returns 0 eternally???
Using BSD. My RTOS application freezes inconsistently only on particular hosts. When debugging it, I came to see that the RTOS timer does not tick at times. The underlying system call is clock() & it always returns zero when the... (4 Replies)
Hi,
Can you please help me in implementing a timer based polling for function in C? ie. the function should be called in say 30secs(when 30secs has lapsed).
Thanks (7 Replies)
Hi
I have questions about timer function in multi-threads environment.
My application has multi-threads, in one thread, I set a timer, when the timer expires, the timer function will interrupt other thread and execute.
I am not clear which thread will be interrupted by the timer function ?... (2 Replies)
Hey guys, I'm brand new to the bash scripting world, here's my issue..
When people SSH to my box, I'm wanting to use screen to monitor them if I so choose. So, I've created a new user: testing, and I've set its startup shell to /bin/myshell.sh whose contents read this:
#!/bin/sh
$me =... (4 Replies)
Hi all,
I am facing a problem in recv() system call i.e.. in my project i have to implement timer for sending (data) and resending purpose when there is no acknowledgement.
is there any way that recv() sys call has its own timer i.e., for ex: recv() has to wait for 10 secs.
if any one knows... (2 Replies)
Hi guys,
First post here - hope it's in the right place.
I'm writing a timer for a client. It can send data every 100ms and receive every 150. It's an AI project so I *don't* want to fork() and pipe or go multi threaded, use interupts etc.
Using linux, gcc 4.3.2
The code I have:
... (2 Replies)
Hello, I have another problem with my script - I would like to have a countdown timer visible on the screen, and at the same time, I want te be able to do something else. And when the time runs out, I need to know about that inside the script somehow and do some action. I guess that would require 2... (3 Replies)
Hi guys. I would need some help really fast..
I have to show a user as a parameter and its group. If the user doesn't exist the script will show "user doesn't exist".
How could I do that?
UNIX (8 Replies)
The book The Design of the Unix Operating System speaks of a clock or timer that is used in scheduling. The clock generates interrupts that update priority information for processes and preempt processes in a round-robin fashion. It's apparent that this "clock" is not the same thing as the CPU... (1 Reply)
I would like this to work with seconds as well.
#!/bin/bash
#
if ; then
echo "Incorrect usage ! Example:"
echo './CountDown.sh -d "Jun 10 2011 16:06"'
echo 'or'
echo './CountDown.sh -m 90'
exit 1
fi
now=`date +%s`
if ; then
until=`date -d... (7 Replies)
I have 2 files that print on the same line at the same time. I wanted to add time.sleep() to 1 of the textfiles. I wanted to delay the time that 1 textfile prints with the other 1 in this script. I wanted to have the files to create new lines instead of printing the same combinations when they both... (5 Replies)