Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Microsoft.Win32;
- static void Main()
- {
- //The SystemEvents class provides the ability to respond to specific types of system events.
- //http://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents(v=vs.110).aspx
- SystemEvents.TimeChanged += SystemEvents_TimeChanged;
- Console.ReadLine();
- }
- static void SystemEvents_TimeChanged(object sender, EventArgs e)
- {
- Console.WriteLine("Time changed");
- }
Advertisement
Add Comment
Please, Sign In to add comment