Monument (
marnanel
) wrote
2010
-
03
-
11
10:08 am
Entry tags:
pgo
Finding the current time on the X server
Someone asked me how you can get the current timestamp from an X server.
This is how.
Flat
|
Top-Level Comments Only
no subject
reddragdiva
2010-03-11 10:45 pm (UTC)
(
link
)
Well, okay. But WHY???
(And Xlib is deprecated and everyone should use xcb instead. Apparently.)
no subject
pne
2010-03-12 10:09 am (UTC)
(
link
)
Well, okay. But WHY???
That was pretty much my reaction, too.
May be discordant with reality
(Anonymous)
2010-03-12 10:39 am (UTC)
(
link
)
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
(Anonymous)
2010-03-12 10:39 am (UTC)
(
link
)
(that was me. -daniels)
4 comments
Post a new comment
Flat
|
Top-Level Comments Only
[
Home
|
Post Entry
|
Log in
|
Search
|
Browse Options
|
Site Map
]
no subject
(And Xlib is deprecated and everyone should use xcb instead. Apparently.)
no subject
That was pretty much my reaction, too.
May be discordant with reality
(Anonymous) 2010-03-12 10:39 am (UTC)(link)Re: May be discordant with reality
(Anonymous) 2010-03-12 10:39 am (UTC)(link)