Solved

Measure Idle Time

Posted on 2004-08-29
7
263 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
  • 2
  • 2
7 Comments
 
LVL 41

Accepted Solution

by:
graye earned 250 total points
Comment Utility
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:akoster
akoster earned 250 total points
Comment Utility
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:akoster
Comment Utility
the 4 days are not over yet ?
0
 
LVL 41

Expert Comment

by:graye
Comment Utility
Sounds like you should volunteer to help administer the site...
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now