Loading ...
Sorry, an error occurred while loading the content.

Timers in Linux

Expand Messages
  • Shriram Ramachandran
    Hi all, I want to know the name of api s which can be used similar to multimedia timer in windows.Such that whenever timer is elapsed it should interrupt the
    Message 1 of 5 , Oct 2, 2001
    • 0 Attachment
      Hi all,
      I want to know the name of api's which can be used
      similar to multimedia timer in windows.Such that
      whenever timer is elapsed it should interrupt the
      application .Where can i find these apis in linux ?

      Thanking you
      Vishal



      __________________________________________________
      Do You Yahoo!?
      Listen to your Yahoo! Mail messages from any phone.
      http://phone.yahoo.com
    • Chirag Kantharia
      ... there s no api. there might be. using signal(2) and SIGALRM is one good way to do things. chyrag. -- Chirag Kantharia, chyrag.dhs.org/ Linux scrooge
      Message 2 of 5 , Oct 2, 2001
      • 0 Attachment
        On Tue, Oct 02, 2001 at 10:59:53PM -0700, Shriram Ramachandran wrote:
        | similar to multimedia timer in windows.Such that
        | whenever timer is elapsed it should interrupt the
        | application .Where can i find these apis in linux ?

        there's no api. there might be. using signal(2) and SIGALRM is one good
        way to do things.

        chyrag.
        --
        Chirag Kantharia, chyrag.dhs.org/
        Linux scrooge 2.4.9-ac9 #1 Thu Sep 20 14:28:11 IST 2001 i686 unknown
      • David Koo
        ... I think there is .... man getitimer, setitimer Koo -- I earn a seven-figure salary. Unfortunately, there s a decimal point involved.
        Message 3 of 5 , Oct 2, 2001
        • 0 Attachment
          ::: | similar to multimedia timer in windows.Such that
          ::: | whenever timer is elapsed it should interrupt the
          ::: | application .Where can i find these apis in linux ?
          :::
          ::: there's no api. there might be. using signal(2) and SIGALRM is one good
          ::: way to do things.

          I think there is ....

          man getitimer, setitimer

          Koo
          --
          I earn a seven-figure salary. Unfortunately, there's a decimal point
          involved.
        • kirti
          #include int getitimer(int which, struct itimerval *value); int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue); The
          Message 4 of 5 , Oct 2, 2001
          • 0 Attachment
            #include <sys/time.h>

            int getitimer(int which, struct itimerval *value);
            int setitimer(int which, const struct itimerval *value, struct
            itimerval *ovalue);
            The system provides each process with three interval timers, each
            decrementing in a distinct time domain.
            When any timer expires, a signal is sent to the process, and the
            timer (potentially) restarts.
            see theses functions
            This may help , I have not tried it.

            Kirti


            ----- Original Message -----
            From: "Chirag Kantharia" <chyrag@...>
            To: <linux-bangalore-programming@yahoogroups.com>
            Sent: Wednesday, October 03, 2001 11:51 AM
            Subject: Re: [blug-prog] Timers in Linux


            > On Tue, Oct 02, 2001 at 10:59:53PM -0700, Shriram Ramachandran wrote:
            > | similar to multimedia timer in windows.Such that
            > | whenever timer is elapsed it should interrupt the
            > | application .Where can i find these apis in linux ?
            >
            > there's no api. there might be. using signal(2) and SIGALRM is one good
            > way to do things.
            >
            > chyrag.
            > --
            > Chirag Kantharia, chyrag.dhs.org/
            > Linux scrooge 2.4.9-ac9 #1 Thu Sep 20 14:28:11 IST 2001 i686 unknown
            >
            >
            >
            > --
            > ---------------------------------------------------------------
            > This is the programming list of the Bangalore Linux Users Group
            > ---------------------------------------------------------------
            > Go to http://linux-bangalore.org for more information
            > about us, as well as our other mailing lists
            >
            >
            > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            >
            >

            *********************************************************
            Disclaimer

            This message (including any attachments) contains
            confidential information intended for a specific
            individual and purpose, and is protected by law.
            If you are not the intended recipient, you should
            delete this message and are hereby notified that
            any disclosure, copying, or distribution of this
            message, or the taking of any action based on it,
            is strictly prohibited.

            *********************************************************
            Visit us at http://www.mahindrabt.com
          • Chirag Kantharia
            ... both work the same way. chyrag. -- Chirag Kantharia, chyrag.dhs.org/ Linux scrooge 2.4.9-ac9 #1 Thu Sep 20 14:28:11 IST 2001 i686 unknown
            Message 5 of 5 , Oct 2, 2001
            • 0 Attachment
              On Wed, Oct 03, 2001 at 11:54:03AM +0530, David Koo wrote:
              | ::: there's no api. there might be. using signal(2) and SIGALRM is one good
              | ::: way to do things.
              | man getitimer, setitimer

              both work the same way.

              chyrag.
              --
              Chirag Kantharia, chyrag.dhs.org/
              Linux scrooge 2.4.9-ac9 #1 Thu Sep 20 14:28:11 IST 2001 i686 unknown
            Your message has been successfully submitted and would be delivered to recipients shortly.