marnanel: (Default)
[personal profile] marnanel
Someone asked me how you can get the current timestamp from an X server.  This is how.

Date: 2010-03-11 10:45 pm (UTC)
reddragdiva: (Default)
From: [personal profile] reddragdiva
Well, okay. But WHY???

(And Xlib is deprecated and everyone should use xcb instead. Apparently.)

Date: 2010-03-12 10:09 am (UTC)
pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
From: [personal profile] pne
Well, okay. But WHY???

That was pretty much my reaction, too.

May be discordant with reality

Date: 2010-03-12 10:39 am (UTC)
From: (Anonymous)
This is only useful relative to other X timestamps though: note in particular that the X server generally uses CLOCK_MONOTONIC these days, so the timestamp you get back is probably not what gettimeofday() will give you.

Re: May be discordant with reality

Date: 2010-03-12 10:39 am (UTC)
From: (Anonymous)
(that was me. -daniels)

Profile

marnanel: (Default)
Monument

January 2022

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 14th, 2025 07:17 pm
Powered by Dreamwidth Studios