Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mktimer(3c) [hpux man page]

mktimer(3C)															       mktimer(3C)

NAME
mktimer - allocate a per-process timer SYNOPSIS
DESCRIPTION
The function is used to allocate a per-process timer using the specified system-wide clock as the timing base. returns an unique timer ID of type used to identify the timer in timer requests (see gettimer(3C)). specifies the system-wide clock to be used as the timing base for the new timer. specifies the mechanism by which the process is to be notified when the timer expires. supports one per-process timer with a of and of If is the system causes a signal to be sent to the process whenever the timer expires. For the machine-dependent clock resolution and maximum value are and seconds, respectively. These constants are defined in RETURN VALUE
Upon successful completion, returns a which can be passed to the per_process timer calls. If unsuccessful, returns a value of and sets to indicate the error. ERRORS
fails if any of the following conditions are encountered: [EAGAIN] The calling process has already allocated all of the timers it is allowed. [EINVAL] is not defined, or does not allow the specified notification mechanism. FILES
SEE ALSO timers(2), getclock(3C), gettimer(3C), reltimer(3C), rmtimer(3C), setclock(3C), thread_safety(5). STANDARDS CONFORMANCE
mktimer(3C)

Check Out this Related Man Page

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)
Man Page

15 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

reply timer

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)
Discussion started by: Optimus_P
2 Replies

2. Shell Programming and Scripting

timer

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)
Discussion started by: k_oops9
3 Replies

3. AIX

Kshell scripts and timing

Hello everyone, I have a script thats acting funky, what I would like to do is report to a file, how long its taking to get to certain area's, in seconds. For example. -- Start timer -- Run unix command 1 -- Run unix command 2 -- Stop timer -- Report Seconds -- etc etc Is there a way... (3 Replies)
Discussion started by: dbridle
3 Replies

4. UNIX for Dummies Questions & Answers

clock() call returning zero always

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)
Discussion started by: smanu
4 Replies

5. Programming

How to implement polling for a function using timer in C?

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)
Discussion started by: naan
7 Replies

6. Shell Programming and Scripting

Simple script? First timer...

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)
Discussion started by: poon
4 Replies

7. 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

8. Homework & Coursework Questions

change

bh,lg.yu.,fgh,ry,.tyl,tyk,ty,ty,ty,. (7 Replies)
Discussion started by: frankycool
7 Replies

9. Shell Programming and Scripting

60 second Timer with Shell Script

Please how can i display a 60 second active countdown timer in an echo message. (7 Replies)
Discussion started by: frankycool
7 Replies

10. Programming

Microsecond timer and printf issues in C++

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)
Discussion started by: scazz
2 Replies

11. Shell Programming and Scripting

Bash - countdown timer

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)
Discussion started by: xqwzts
3 Replies

12. UNIX for Dummies Questions & Answers

Need some help

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)
Discussion started by: vladboy14
8 Replies

13. UNIX for Advanced & Expert Users

Xt timer call, XtAppAddTimeout, hangs on system clock jump backwards

Hi, I've got an issue which I've been 'google-fu'ing without much luck. We have a legacy program which has been plagued by an issue for a long time and I've been tasked to investigate/fix. The program uses XMotif2.1 (required due to dependency on an old GUI designer) and runs on a RHEL7... (4 Replies)
Discussion started by: altrefrain
4 Replies

14. Ubuntu

Countdown timer with seconds

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)
Discussion started by: drew77
7 Replies

15. UNIX for Beginners Questions & Answers

Adder timer to 1 of these columns

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)
Discussion started by: bigvito19
5 Replies