Updating clock

So far i make reference to my textview ( where digital clock will be displayed ), and i got instance of Calendar class and i also sign minutes, hours and seconds to instance variables: If i run this code, the accurate time is displayed on emulator but obviously it's not updating.What i must do, so my code will "looping" and updating my clock?I realize that bunny; but; there must be a way to change what server(s) the clock syncs to and how often; isnt there?I have no idea but generally the time on your OS is from the time on your motherboard clock and that doesn't come from a server.Get System Time As File Time copies the time to a FILETIME structure.To set the system time, use the Set System Time function.You can use a Handler, a Timer Task, a Thread or some other mechanism that allows you to schedule something to happen in the future.

When the system first starts, it sets the system time to a value based on the real-time clock of the computer and then regularly updates the time.I'm searching for the easiest solution to implement a self updating digital clock in Android.I know that there is already digital clock class: and yes it's also deprecated. Anyways for the sake of learning i want to make my own custom clock showing hh:mm:ss and of course should updating itself.Instead, use one of the methods described in Windows Time.var microsoft = microsoft

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating clock”