|This is a jQuery plugin that will turn a given dom element into a clock which can display either the local time on the user's machine, or it can take a custom timestamp to display for example the server time.
You can even pass in a timestamp obtained from an NTP timeserver.
The date and time can be rendered in different formats using PHP style Format Characters, in any given locale. The clock can by styled using a few simple css rules.
The clock updates every 500 ms by default, but can be set to update at a custom rate (for example, if not displaying seconds, it could update every 30 secs instead of every 500 ms). It also supports displaying microseconds.
It uses the ECMA Script Intl.DateTimeFormat for localization purposes, and uses the Peformance.now() and Performance.timing Web API in order to achieve a certain independence from the local system clock which can tend to skew slightly, thus producing a high performing precision clock.