Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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

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.
 
Share this answer
 
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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900