Hi, Oliver, Thanks a lot for your reply. I tried this idea before. But the time of the start of the X server I got in this way was not accurate enough for my purpose.
Does anybody know how X computes the time stamp for xEvents? Thanks, Weidong Cui > I don't know much about this, but I would suggest, that you > use the time-function to get the time in seconds. You divide > the number of milliseconds to get seconds and then subtract > the values. You get the time of the start of the X-Server > in seconds. > Maybe you can use this idea > Oliver Welter > -----Original Message----- > From: Weidong Cui [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 3:32 PM > To: [EMAIL PROTECTED] > Subject: How to convert the server time in xEvent to system time? > > > Hi, There, > > xEvent.u.keyButtonPointer.time (aka 'server time'?), defined > in X11/Xproto.h, indicates the number of milliseconds elapsed > since the X server started. I want to convert it to an > "absolute" time which then can be compared with times > recorded by gettimeofday () in some other program. > Unfortunately, after spending a lot of time, I still can't > find out how to do it. If you happen to know how to do it, > can you please tell me? > > Thanks a lot! > Weidong Cui > > _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel