Absolute timestamps of XEvents - Xwindows

This is a discussion on Absolute timestamps of XEvents - Xwindows ; Hi! Is it possible to convert for example XKeyEvent::time to an absolute time description such as timeval. When I print XKeyEvent::time on my system i get a negative integer that is counting down: Motion at time:-793512152 Motion at time:-793512144 Motion ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Absolute timestamps of XEvents

  1. Absolute timestamps of XEvents

    Hi!

    Is it possible to convert for example XKeyEvent::time to an absolute
    time description such as timeval. When I print XKeyEvent::time on my
    system i get a negative integer that is counting down:

    Motion at time:-793512152
    Motion at time:-793512144
    Motion at time:-793512136
    Motion at time:-793512128
    ...

    Thanks in advance,
    Nordl÷w

  2. Re: Absolute timestamps of XEvents

    On Jan 31, 9:38 am, "Nordl÷w" wrote:
    > Hi!
    >
    > Is it possible to convert for example XKeyEvent::time to an absolute
    > time description such as timeval. When I print XKeyEvent::time on my
    > system i get a negative integer that is counting down:


    How are you printing the number? On my system, Time is an unsigned
    long, so you're probably printing an unsigned unmber as a signed one.

    -Ed

    --
    (You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/~er258)

    /d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
    r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
    d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage

  3. Re: Absolute timestamps of XEvents

    On Jan 31, 8:38*am, "Nordl÷w" wrote:
    > Hi!
    >
    > Is it possible to convert for example XKeyEvent::time to an absolute
    > time description such as timeval. When I print XKeyEvent::time on my
    > system i get a negative integer that is counting down:
    >
    > Motion at time:-793512152
    > Motion at time:-793512144
    > Motion at time:-793512136
    > Motion at time:-793512128
    > ...


    Time is an unsigned long, representing server time in milliseconds. It
    has an arbitrary starting time for zero, and on a 32-bit machine will
    wrap and become zero again every 49.7 days. As far as I can tell,
    there is no way to correlate it to true time.
    --
    Fred Kleinschmidt

+ Reply to Thread