Re: timer implementation

From: Adie (a_usenetizen_at_hotmail.com)
Date: 04/29/03

  • Next message: xinit: "Re: bit of help with a couple of pieces of code"
    Date: Tue, 29 Apr 2003 10:48:06 +0100
    
    

    Valentin Nechayev <netch@segfault.kiev.ua> wrote:

    >>>> Srinivas Mudigonda wrote:
    >
    >SM> I am a novice unix programmer. I would like to know, how to implement
    >SM> multiple timers for a process. both in user process and kernel timers. Any
    >SM> leads about doing this would be a great favour to me.
    >
    >Make queue for requested events, sorted by their times. Even if timer
    >is used for periodical polling of something, this polling is treated as event.
    >If you want to use signals, use setitimer() for call a signal for the next
    >time it is requested. Otherwise, program can sleep on select() or something
    >similar with high resolution timeout.
    >For a ready-to-use library with its, see ISC eventlib (separately or in BIND
    >product).

    Hi, do you know if there ia a timer api that can be used in Linux and
    Unix from C++? I'd like to implement some sort of time out for my
    sockets program.


  • Next message: xinit: "Re: bit of help with a couple of pieces of code"

    Relevant Pages

    • Re: timer implementation
      ... SM> I am a novice unix programmer. ... SM> multiple timers for a process. ... both in user process and kernel timers. ... If you want to use signals, use setitimerfor call a signal for the next ...
      (comp.unix.programmer)
    • Re: pthread waiting on msgrcv does not unblock on timer expiry
      ... start two different timers using ... from msgrcvwith perrorshowing errno= EINTR on RL4 machine. ... Because of the way UNIX signals interact with POSIX threads. ... Accordingly to Pthreads, signal handler set-up with /sigaction/ are ...
      (comp.os.linux.development.apps)
    • Re: 16-bits ADC anyone?
      ... information from a sensor. ... You can build a cheap & simple dual slope converter with an external ... (I don't know if other micros also have 16 bit timers with external gate ... signals. ...
      (comp.arch.embedded)
    • 2 timers problem.
      ... external device two periodic pulse signals rigidly connected with each ... Both of a signal has the strictly identical period but width of pulse ... Is C6416 allowed to perform synchronization between timers by timer ... If no - how I can produce strict delay between timers? ...
      (comp.dsp)
    • Re: Timers & socket select
      ... what if I wanted to use timers and alarms? ... The main problem with signals is that you are quite limited in what you can ... to) write to the write end of the pipe. ...
      (comp.unix.programmer)