9

X11 API question C programming

view full story
linux-howto

http://www.linuxquestions.org – I put together a C program to get the idle time of my laptop using an X11 API. The header file scrnsaver.h, says that inside of the struct is a member called idle. Which is allocated and returned by the XScreenSaverAllocInfo function. Then XScreenSaverQueryInfo returns information about the current state of the screen server into the struct. Then I can print the idle time by calling the struct member with printf but it is not behaving like expected. The API says idle time is returned in milliseconds but I seem to think that's not the case. I'll leave the computer idle for 40 seconds but the r (HowTos)