Solved

Measure Idle Time

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cognitive Services 1 38
SQL Insert parts by customer 12 53
storing csv file in table variable in Python 2 62
IntelliJ and Eclipse Neon 2 installations 4 35
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

749 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