Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Summary: How to obtain the Server time

1 view
Skip to first unread message

Gregory Gancarz

unread,
Nov 1, 1994, 1:28:55 PM11/1/94
to
Thanks to all who responded. The question was: How can the Server time be
obtained. This can be accomplished by doing the following:

XSelectInput(display, win, PropertyChangeMask)
(select for the event generated by XChangeProperty)
.
.
.
XChangeProperty(display, win, XA_WM_NAME, XA_STRING, 8,
PropModeAppend, NULL, NULL);
(when you want to know the server time, append zero-length data to some
window property; this generates a PropertyNotify event)
.
.
.
case PropertyNotify:
printf("Server Time is now %ld\n",report.xproperty.time);
(when the event is received, we have the time value.)

-Greg Gancarz

Robert Andrew Ryan

unread,
Nov 1, 1994, 6:27:26 PM11/1/94
to
Excerpts from netnews.comp.windows.x: 1-Nov-94 Summary: How to obtain
the .. Gregory Gan...@park.bu. (615)

> XChangeProperty(display, win, XA_WM_NAME, XA_STRING, 8,
> PropModeAppend, NULL, NULL);

The last two arguments might not work on all platforms... It should be
something like:

{
unsigned char dummy;
....


XChangeProperty(display, win, XA_WM_NAME, XA_STRING, 8, PropModeAppend,

&dummy, 0);
...
}

The original risked a NULL dereference (unlikely) but at the very least
has a type mismatch on the element count in the last argument (on
platforms where NULL is a 0 cast to a pointer).

-Rob

0 new messages