Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

iv_timer(3) [debian man page]

iv_timer(3)						    ivykis programmer's manual						       iv_timer(3)

NAME
iv_timer_register, iv_timer_unregister, iv_timer_registered - deal with ivykis timers SYNOPSIS
#include <iv.h> struct iv_timer { struct timespec expires; void *cookie; void (*handler)(void *); }; void IV_TIMER_INIT(struct iv_timer *timer); void iv_timer_register(struct iv_timer *timer); void iv_timer_unregister(struct iv_timer *timer); int iv_timer_registered(struct iv_timer *timer); DESCRIPTION
The functions iv_timer_register and iv_timer_unregister register, respectively unregister, a timer with the current thread's ivykis event loop. iv_timer_registered on a timer returns true if that timer is currently registered with ivykis. When a timer that is registered becomes 'ready', due to the current system clock value becoming greater than or equal to the timer's ->expires member field, the callback function specified by ->handler is called in the thread that the timer was registered in, with ->cookie as its first and sole argument. When this happens, the timer is transparently unregistered. The application is allowed to change the ->cookie and ->handler members at any time. The application is not allowed to change the ->expires member while the timer is registered. A given struct iv_timer can only be registered in one thread at a time, and a timer can only be unregistered in the thread that it was reg- istered from. There is no limit on the number of timers registered at once. See iv_examples(3) for programming examples. SEE ALSO
ivykis(3), iv_examples(3) ivykis 2010-08-15 iv_timer(3)

Check Out this Related Man Page

iv_timer(3)						    ivykis programmer's manual						       iv_timer(3)

NAME
iv_timer_register, iv_timer_unregister, iv_timer_registered - deal with ivykis timers SYNOPSIS
#include <iv.h> struct iv_timer { struct timespec expires; void *cookie; void (*handler)(void *); }; void IV_TIMER_INIT(struct iv_timer *timer); void iv_timer_register(struct iv_timer *timer); void iv_timer_unregister(struct iv_timer *timer); int iv_timer_registered(struct iv_timer *timer); DESCRIPTION
The functions iv_timer_register and iv_timer_unregister register, respectively unregister, a timer with the current thread's ivykis event loop. iv_timer_registered on a timer returns true if that timer is currently registered with ivykis. When a timer that is registered becomes 'ready', due to the current system clock value becoming greater than or equal to the timer's ->expires member field, the callback function specified by ->handler is called in the thread that the timer was registered in, with ->cookie as its first and sole argument. When this happens, the timer is transparently unregistered. The application is allowed to change the ->cookie and ->handler members at any time. The application is not allowed to change the ->expires member while the timer is registered. A given struct iv_timer can only be registered in one thread at a time, and a timer can only be unregistered in the thread that it was reg- istered from. There is no limit on the number of timers registered at once. See iv_examples(3) for programming examples. SEE ALSO
ivykis(3), iv_examples(3) ivykis 2010-08-15 iv_timer(3)
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

Linux Os Crash Script

How can I simulate a Linux OS crash without damaging the OS? I am performing an os watchdog test that sends out an alert once the timer expires. (1 Reply)
Discussion started by: cstovall
1 Replies

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

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

5. Programming

Questions about timer in multi-threads environment

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

6. Programming

Recv() call with timer(time out )

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

7. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

8. UNIX for Dummies Questions & Answers

What i have to do to b'com UA??

Hi... I am newbie here, just registered. This is my first thread and first post as well. I am a student belongs to IT field. In this period of exhaustion, I have decided to learn UNIX and become Unix administrator. I want your valuable guidance from scratch, i mean for learning Unix firstly i have... (5 Replies)
Discussion started by: ezee
5 Replies

9. Homework & Coursework Questions

change

bh,lg.yu.,fgh,ry,.tyl,tyk,ty,ty,ty,. (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. Programming

Using pointers to struct members as args to functions

In a well-known book on the C language, there is an example of an efficient method for using a struct member as an argument to a function. (I'm a C noob, but I believe the correct terminology might be: use call-by-reference instead of call-by-value.) The function is printf. Anyway, here's a... (5 Replies)
Discussion started by: uiop44
5 Replies

12. UNIX for Dummies Questions & Answers

About Unix File creation time

Hello, I registered and recreated this thread because everywhere we can see "It's not possible to get the file creation time in UNIX fs". This is not true any more with Ext4! Unfortunately, there is not user-level tools that allow you to read those information. You have to use a low level tool... (4 Replies)
Discussion started by: gaellafond
4 Replies

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

14. Post Here to Contact Site Administrators and Moderators

new id

Hi all ,i'm huaihaizi3(the old ID), i registered a new ID complex.invoke, i like it as the new one is OOP supported as which is in the form of object.member(just a joke, ^_^,:D) Is it possible to move all my posts of my old ID huaihaiz3 to the new one complex.invoke? If so, i'll be very grateful... (5 Replies)
Discussion started by: complex.invoke
5 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