Solved

Measure Idle Time

Posted on 2004-08-29
7
303 Views
Last Modified: 2013-11-15
I would like to measure the idle time the same way a screen saver does. I want to do this for different operating systems; linux, mac os x, windows. I also want to know whether a pc is connected to some network or is totally disconnected for the types of operating systems mentioned earlier.
0
Comment
Question by:kkonst04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 41

Accepted Solution

by:
graye earned 250 total points
ID: 11927940
I don't think you're gonna find a single answer to fit all of the OS's you mentioned.

From a Windows perspective, the API that is used by the screen saver is GetLastInputInfo, detecting the existance of a network, the API is typically WNetGetNetworkInformation

DWORD WNetGetNetworkInformation(
  LPCTSTR lpProvider,
  LPNETINFOSTRUCT lpNetInfoStruct
);

typedef struct tagLASTINPUTINFO {
    UINT cbSize;
    DWORD dwTime;
} LASTINPUTINFO, *PLASTINPUTINFO;

BOOL GetLastInputInfo(
    PLASTINPUTINFO plii
);
0
 
LVL 19

Assisted Solution

by:Arno Koster
Arno Koster earned 250 total points
ID: 11929455
You could try to ping a list of computers. Depending on the output you can determine whether the computer is online or not

this can be done in most languages, ranging from (visual)basic and batch to java or C

0
 
LVL 19

Expert Comment

by:Arno Koster
ID: 12257853
the 4 days are not over yet ?
0
 
LVL 41

Expert Comment

by:graye
ID: 12264647
Sounds like you should volunteer to help administer the site...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hive vs Impla in Hadoop 1 153
Starting to use Git with Visual  Studio Online 1 71
I am looking for a reliable program to clone servers 5 108
Driver collector? 4 38
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question