Group Abstract Group Abstract

Message Boards Message Boards

0
|
14.5K Views
|
11 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Implement a clock that can be used to synchronize another clock?

Posted 8 years ago

How can I implement a clock that can be used to synchronize another clock?

POSTED BY: Rodrigo Sambade
11 Replies
POSTED BY: Hans Michel
Posted 4 years ago

I think the US does at least a decent job of providing accurate time at: https://www.time.gov.

That said, I needed a challenge this afternoon.

How about this (it seems to match https://www.time.gov):

First cell:

now = DateString[Now, "ISODateTime"];
Dynamic[now]

Second cell:

i = 1;
While [i < 10000000, i++; now = DateString[Now, "ISODateTime"]]

Though you will have to force the engine to stop.

POSTED BY: Mike Besso

You can use this

Dynamic[Refresh[Now, UpdateInterval -> 1]] or 
Dynamic[Refresh[DateString[], UpdateInterval -> 1]]

I usually style the datestring to larger font and color.

POSTED BY: Jack I Houng

Do you mean a Clock[] or an animated wall clock, or some other sort of clock, like a game clock? Why do you need two clocks: cannot the output of one clock be used in multiple places? Or is one a physical clock, controlled by Mathematica?

POSTED BY: Michael Rogers
POSTED BY: Rodrigo Sambade

I feel there is something probably still missing from the description of the problem, but when I want something to show me the time, I use a cell phone or maybe my computer's clock, which set their times from one of the NIST servers. In Mathematica you can use DateString[] or DateList[]. I don't know what its source is, maybe the computer's clock.

POSTED BY: Michael Rogers

I just want Mathematica to get the atomic time from a server and display it in real time so that I can synchronize my watch on my wrist.

POSTED BY: Rodrigo Sambade
Posted 5 years ago

Why do you need Mathematica to do this? On a Linux or Mac OS shell

cat </dev/tcp/time.nist.gov/13

Your computer is probably set to synchronize its clock with NIST so you can just do this from the shell

date
POSTED BY: Rohit Namjoshi

I don't need that. I need real-time time.

POSTED BY: Rodrigo Sambade
Posted 4 years ago

What do you mean by "real-time time"?

POSTED BY: Rohit Namjoshi
POSTED BY: Rodrigo Sambade
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard