Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get milliseconds from epoch via HTTP

I am working on a microcontroller and don't want to keep track of time with the system clock. I want to make an HTTP request to get the current time in milliseconds from the epoch (1970). I already know how to form all the requests, I just can't find a url that can return this data to me. Who offers this as an API? I don't want to make an https request.

like image 246
Kyle Weller Avatar asked Sep 24 '13 05:09

Kyle Weller


1 Answers

I have a site called Current Millis and theoretically infinite bandwidth. I think i can quickly write a php, say www.currentmillis.com/api/millis-since-epoch.php. Is this ok for you?

UPDATE: It was infinite bandwidth but not infinite resources.. Because the server can not hope to sustain millions of HTTP requests to a service that resolves time to the millisecond, that URL has been discontinued.. Instead minutes since epoch are offered now: http://currentmillis.com/time/minutes-since-unix-epoch.php (because within 1 minute the value can be cahced by the host server)

like image 119
Sandman Avatar answered Sep 22 '22 17:09

Sandman