Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Measure Idle Time

Posted on 2004-08-29
7
Medium Priority
?
315 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 1000 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 1000 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.
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…

715 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