Click here to Skip to main content
12,297,786 members (46,438 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
how to develop a clock or time control in which i want to change time manually and it wont depends on the system time(DateTime.Now) using C#
Posted 7-Jan-13 18:08pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I just answered this. If you have any other questions, then edit your question. You can use a timer, but it's more precise to let the system time do it's job and for you to just store the offset from the time you want to show, and the time the system knows. Otherwise your time can drift because windows timers are not reliable.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

As Christian says, store/use an offset to calculate your application's 'time'. If you want no tie to the system time then us SNTP[^] to get the real time and use your offset although this will require an internet connection and periodic checks to keep it accurate.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100