CoolClock
CoolClock shows an analog clock that keeps time in the browser. It suits dashboards, kiosks and world-clock panels: once it's on the page it ticks without any server round trips. It comes with 19 skins, from a Swiss railway clock to purely decorative faces.
It wraps the CoolClock JavaScript library by Simon Baird and draws on an HTML canvas.

Fancy skin with ShowDigital turned on.
Installation
dotnet add package Wisej-4-CoolClock
The package targets .NET Framework 4.8 and .NET 8 (including the -windows, Android, iOS and Mac Catalyst targets). After a rebuild, CoolClock appears in the Visual Studio toolbox.
Getting started
- C#
- VB.NET
using Wisej.Web.Ext.CoolClock;
// A clock showing the time in Tokyo.
var clock = new CoolClock
{
Size = new Size(200, 200),
Skin = CoolClockSkin.Classic,
ShowDigital = true,
GmtOffset = 9
};
this.Controls.Add(clock);
Imports Wisej.Web.Ext.CoolClock
' A clock showing the time in Tokyo.
Dim clock As New CoolClock With {
.Size = New Size(200, 200),
.Skin = CoolClockSkin.Classic,
.ShowDigital = True,
.GmtOffset = 9
}
Me.Controls.Add(clock)
The face is always round. Its radius is half of the smaller of the control's width and height, and it's centered horizontally.
Properties
| Property | Default | What it does |
|---|---|---|
Skin | ChunkySwiss | The look of the face and hands. See the list below. |
ClockType | Standard | Standard, or Logarithmic / LogarithmicReversed, which draw the hands and ticks on a logarithmic scale (CoolClockType). |
ShowDigital | false | Also shows the time as digits inside the face. |
ShowSecondHand | true | Shows the second hand. It also decides which of the two redraw intervals applies. |
TickDelay | 1000 | Milliseconds between redraws while the second hand is shown. |
LongTickDelay | 15000 | Milliseconds between redraws while it's hidden. |
GmtOffset | 0 | Hours added to UTC. 0 means the browser's local time. |
The available CoolClockSkin values are Babosa, ChunkySwiss, Classic, Cold, Disc, Fancy, Lev, Machine, Modern, Sand, Securephp, Simonbaird, Simple, Stone, Sun, SwissRail, Tor, Tumb and Watermelon.
Hiding the second hand switches the redraw to LongTickDelay, every 15 seconds by default. For a wall of clocks, or on low-powered devices, that uses far less CPU than redrawing every clock every second.
Time zones
The clock reads the time in the browser, not on the server. With GmtOffset at 0 it shows the user's local time. Any other value shows UTC plus that many hours, which makes a row of world clocks easy:
- C#
- VB.NET
this.clockNewYork.GmtOffset = -5;
this.clockBerlin.GmtOffset = 1;
this.clockLocal.GmtOffset = 0; // the browser's local time
Me.ClockNewYork.GmtOffset = -5
Me.ClockBerlin.GmtOffset = 1
Me.ClockLocal.GmtOffset = 0 ' the browser's local time
GmtOffset is an integer number of hours, and the library doesn't apply daylight saving time. Time zones with half-hour offsets, such as India (UTC+5:30), can't be shown exactly, and a fixed offset is off by an hour for half the year wherever the clocks change. To follow a zone's rules, compute its current offset on the server, for example with TimeZoneInfo.GetUtcOffset, and update GmtOffset when it changes.
UTC 0 itself is the one offset you can't set, since 0 means local time. Use a clock with GmtOffset = 0 for a UTC display only when you know the browser runs on UTC.
Theming
The control's appearance key is coolclock. Use it in a theme mixin to style the control's container, such as its background and border. The face and hands are drawn by the skin.
API reference
CoolClockCoolClockSkinandCoolClockType- The whole
Wisej.Web.Ext.CoolClocknamespace