Using setitimer multiple times - Xwindows

This is a discussion on Using setitimer multiple times - Xwindows ; Hi, I am developing an appilation in Xlib , i need timer to call many function at different instances but the signal SIG_ALRAM allows to mmention only one function and when SIG_IGN is signalled it stops.So if anyone can help ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Using setitimer multiple times

  1. Using setitimer multiple times

    Hi,

    I am developing an appilation in Xlib , i need timer to call many
    function at different instances but the signal SIG_ALRAM allows to
    mmention only one function and when SIG_IGN is signalled it stops.So
    if anyone can help out thanks in advance.

  2. Re: Using setitimer multiple times



    Anjina Murthy wrote:
    >
    > Hi,
    >
    > I am developing an appilation in Xlib , i need timer to call many
    > function at different instances but the signal SIG_ALRAM allows to
    > mmention only one function and when SIG_IGN is signalled it stops.So
    > if anyone can help out thanks in advance.


    Use XtAppAddTimeOut().

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225

  3. Re: Using setitimer multiple times

    Hi Fred,

    XtAppAddTimeOut() is from X Toolkit Intrinsics functions but i want
    to use only XLib functions similar to setitimer. If you knwon any
    function or method please share it.

    "Fred L. Kleinschmidt" wrote in message news:<40A8D4E5.C947960B@nospam_boeing.com>...
    > Anjina Murthy wrote:
    > >
    > > Hi,
    > >
    > > I am developing an appilation in Xlib , i need timer to call many
    > > function at different instances but the signal SIG_ALRAM allows to
    > > mmention only one function and when SIG_IGN is signalled it stops.So
    > > if anyone can help out thanks in advance.

    >
    > Use XtAppAddTimeOut().


  4. Re: Using setitimer multiple times

    Anjina Murthy wrote:

    > Hi Fred,
    >
    > XtAppAddTimeOut() is from X Toolkit Intrinsics functions but i want
    > to use only XLib functions similar to setitimer. If you knwon any
    > function or method please share it.


    Setitimer is not an xlib function either. The X solution is
    XtAppAddTimeOut. If you don't use that you have to write system
    specific code which means you should ask about it in a forum that deals
    with the system(s) you are targetting.

    UNIX/Linux have no standard/portable system calls to manage scheduling
    of multiple events for you. You'll have to code your main loop to
    manage scheduling of your callbacks. IOW, you'll have to write your
    own version of XtAppAddTimeOut and the underlying Xt dispatching code.

    -- ced

    >
    > "Fred L. Kleinschmidt" wrote in message news:<40A8D4E5.C947960B@nospam_boeing.com>...
    >
    >>Anjina Murthy wrote:
    >>
    >>>Hi,
    >>>
    >>> I am developing an appilation in Xlib , i need timer to call many
    >>>function at different instances but the signal SIG_ALRAM allows to
    >>>mmention only one function and when SIG_IGN is signalled it stops.So
    >>>if anyone can help out thanks in advance.

    >>
    >>Use XtAppAddTimeOut().



    --
    Chuck Dillon
    Senior Software Engineer
    NimbleGen Systems Inc.

  5. Re: Using setitimer multiple times

    Anjina Murthy wrote:

    > Hi Fred,
    >
    > XtAppAddTimeOut() is from X Toolkit Intrinsics functions but i want
    > to use only XLib functions similar to setitimer. If you knwon any
    > function or method please share it.
    >
    > "Fred L. Kleinschmidt" wrote in message news:<40A8D4E5.C947960B@nospam_boeing.com>...
    >
    >>Anjina Murthy wrote:
    >>
    >>>Hi,
    >>>
    >>> I am developing an appilation in Xlib , i need timer to call many
    >>>function at different instances but the signal SIG_ALRAM allows to
    >>>mmention only one function and when SIG_IGN is signalled it stops.So
    >>>if anyone can help out thanks in advance.

    >>
    >>Use XtAppAddTimeOut().


    I know of nothing similar to XtAppAddTimeOut.
    Xlib does not deal with callback.

    How about something like
    fd = XConnectionNumber(display);
    for(; {
    select ( ... , ... , ... , timeout ) ;
    if (timed-out){ do timeout stuff }
    else {
    XNextEvent ( display , &event ) ;
    handle the event ;
    }
    }

  6. Re: Using setitimer multiple times

    Anjina Murthy wrote:

    > Hi Fred,
    >
    > XtAppAddTimeOut() is from X Toolkit Intrinsics functions but i want
    > to use only XLib functions similar to setitimer. If you knwon any
    > function or method please share it.
    >
    > "Fred L. Kleinschmidt" wrote in message news:<40A8D4E5.C947960B@nospam_boeing.com>...
    >
    >>Anjina Murthy wrote:
    >>
    >>>Hi,
    >>>
    >>> I am developing an appilation in Xlib , i need timer to call many
    >>>function at different instances but the signal SIG_ALRAM allows to
    >>>mmention only one function and when SIG_IGN is signalled it stops.So
    >>>if anyone can help out thanks in advance.

    >>
    >>Use XtAppAddTimeOut().



    I know of nothing similar to XtAppAddTimeOut.
    Xlib does not deal with callback (except for errors).

    How about something like
    fd = XConnectionNumber(display);
    for(; {
    select ( ... , ... , ... , timeout ) ;
    if (timed-out){ do timeout stuff }
    else {
    XNextEvent ( display , &event ) ;
    handle the event ;
    }
    }

+ Reply to Thread