Solved

Measure Idle Time

Posted on 2004-08-29
7
286 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
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:akoster
akoster 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:akoster
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

776 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