473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C# Watch System Time Change

radcaesar
759 Expert 512MB
Hey Buddies,
I Want to watch the system time cahnge in OS. Is there any windows API Event which fires when the user changes the system Time ?
May 17 '07 #1
1 6974
TRScheel
638 Expert 512MB
Hey Buddies,
I Want to watch the system time cahnge in OS. Is there any windows API Event which fires when the user changes the system Time ?
Short answer, no...

Long answer...

(PSEUDO CODE)
Expand|Select|Wrap|Line Numbers
  1. while(program running)
  2. {
  3. currentTime = DateTime.Now;
  4. if (currentTime - OldTime >= 2 minues)
  5.     //TIME HAS BEEN CHANGED
  6. OldTime = currentTime;
  7. Thread.Sleep(60000);
  8. }
Basically just create a program to check the time against the last polled time, and see if the change in time is equal to or greater then 2 minutes. Then have it sleep for a minute (60k milliseconds).
May 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris | last post by:
I need to monitor a bunch of files to see what is being opened, read, and closed, with no modifications being made. This is being done first on Windows machines, and later on Solaris. Looking...
3
by: jason | last post by:
Does anyone have any ideas on a PAGE WATCH tool or an application that allows a user to be notified when page changes automatically by email. My immediate thoughts would be to use the FSO object...
10
by: Nancy Drew | last post by:
hi all i want to build a trouble ticket system. i'd like to have a component written in vbscript watch a specific mail folder for income email (something like 'troubletickets@acme.com') the...
3
by: Neil | last post by:
Hi, If I have the code line "DateTime d1 = DateTime.Now;" and look at d1 in the watch window, I thought I'd only see the properties of the DateTime object variable d1. However I seem to be...
16
by: Ricky W. Hunt | last post by:
Is there a way to watch a variables value in real-time without running in break mode? It seems you should just be able to give VB a list of variables/objects that you could see at any time without...
1
by: self | last post by:
hello, This is my first time to post here, and I need some help with a little problem. I am trying to watch the process of of one application. and show it in a true/false field. here is what i...
9
by: Xah Lee | last post by:
REQUIREMENTS FOR A VISUALIZATION SOFTWARE SYSTEM FOR 2010 Xah Lee, 2007-03-16 In this essay, i give a list of requirements that i think is necessary for a software system for creating...
8
by: Greg | last post by:
Dear all, I've trouble with debugging a huge programm. I want to look into the properties of an object when I am at a breakpoint. But in the watch window he tell's me that the object is "out of...
176
by: . | last post by:
9/11 Mysteries http://video.google.com/videoplay?docid=-8172271955308136871 http://www.911weknow.com Ignore those who would go to great effort and expend much of heir time in poo-pooing this...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.