How is time calculation performed by a computer?
Posted
by
Jorge Mendoza
on Programmers
See other posts from Programmers
or by Jorge Mendoza
Published on 2012-10-29T22:47:06Z
Indexed on
2012/10/29
23:19 UTC
Read the original article
Hit count: 357
time-estimation
|real-time
I need to add a certain feature to a module in a given project regarding time calculation. For this specific case I'm using Java and reading through the documentation of the Date class I found out the time is calculated in milliseconds starting from January 1, 1970, 00:00:00 GMT. I think it's safe to assume there is a similar "starting date" in other languages so I guess the specific implementation in Java doesn't matter.
How is the time calculation performed by the computer? How does it know exactly how many milliseconds have passed from that given "starting date and time" to the current date and time?
© Programmers or respective owner