• Updated 25 Nov, 00:22 UTC
  • Next run 25 Nov, 05:17 UTCNext 25 Nov 05:17
  • Last 7 days: 6 new models · 62 runs7 d: 6 models · 62 runs
Wristwatch that shows the current time

Solar Pro 4 ContributorUpstage

Network offOpen alone (new tab)

Run details

Model
upstage/solar-pro-4-contributor
Route
OpenRouter API
Served by
Upstage
Effort
medium (OpenRouter default)
Limits
60 min · 131,072 output tokens (model max)
Date
25 Nov 2026
Time
2 min 16 s
Size
20 kB
Tokens
127 in, 7,889 out
List price
$0.003 at today's price ($0.09 in / $0.36 out per M)
Paid
$0.003

Raw: output · meta.json

Prompt

Draw a mechanical wristwatch that shows the current local time, with a sweeping seconds hand and a date window. Make it look expensive.

It must be one complete, self-contained HTML file: inline all CSS and JavaScript, and make no network requests of any kind (no CDNs, web fonts or remote images). Reply with the file in a single ```html code block.

Source

20 kB 903 lines Raw

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mechanical Wristwatch</title>
<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a14 100%);
    font-family: 'Georgia', 'Times New Roman', serif;
    padding: 20px;
  }

  /* ===== Outer case ===== */
  .watch-case {
    position: relative;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    /* stepped metal gradient - brushed steel look */
    background: radial-gradient(
      circle at 35% 30%,
      #e8e8ec 0%,
      #c9c9d0 40%,
      #a8a8b4 70%,
      #8a8a96 100%
    );
    box-shadow:
      0 0 0 6px #2a2a35,
      0 0 0 12px #c0c0cc,
      0 0 0 14px #4a4a55,
      0 0 0 18px #1a1a22,
      0 20px 60px rgba(0, 0, 0, 0.7),
      inset 0 2px 4px rgba(255, 255, 255, 0.3),
      inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    cursor: default;
  }

  /* crown (winder) on the right */
  .crown {
    position: absolute;
    right: -28px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 44px;
    background: linear-gradient(
      135deg,
      #d4d4dc 0%,
      #a0a0ac 50%,
      #c8c8d2 100%
    );
    border-radius: 3px 10px 10px 3px;
    box-shadow:
      0 0 0 2px #2a2a35,
      0 4px 10px rgba(0, 0, 0, 0.5),
      inset 0 1px 2px rgba(255, 255, 255, 0.4);
  }

  /* pusher buttons above/below crown */
  .pusher-top {
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #c0c0cc, #909098);
    border-radius: 2px;
    box-shadow: 0 0 0 2px #2a2a35, 0 3px 6px rgba(0,0,0,0.4);
  }
  .pusher-bottom {
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%) translateY(30px);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #c0c0cc, #909098);
    border-radius: 2px;
    box-shadow: 0 0 0 2px #2a2a35, 0 3px 6px rgba(0,0,0,0.4);
  }

  /* ===== Crystal glass overlay ===== */
  .crystal {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
      ellipse at 30% 25%,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0.04) 40%,
      rgba(255, 255, 255, 0) 60%
    );
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: overlay;
  }

  /* ===== Dial face ===== */
  .dial {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: radial-gradient(
      circle at 50% 40%,
      #f4eedb 0%,
      #ede5d0 40%,
      #e3d9c2 70%,
      #d9cfb4 100%
    );
    box-shadow:
      inset 0 0 30px rgba(120, 100, 60, 0.15),
      inset 0 0 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    z-index: 1;
  }

  /* subtle guilloche-like texture via repeating gradients */
  .dial::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
      repeating-conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(140, 120, 80, 0.03) 0.5deg,
        transparent 1deg
      );
    pointer-events: none;
  }

  /* ===== Chapter ring (minute track) ===== */
  .chapter-ring {
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    border: 1px solid rgba(80, 70, 50, 0.25);
    pointer-events: none;
  }

  .chapter-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(
      from -90deg,
      rgba(80,70,50,0.12) 0deg, transparent 1deg,
      rgba(80,70,50,0.12) 1deg, transparent 2deg,
      rgba(80,70,50,0.08) 2deg, transparent 3deg,
      transparent 4deg,
      rgba(80,70,50,0.12) 5deg, transparent 6deg,
      rgba(80,70,50,0.12) 6deg, transparent 7deg,
      transparent 8deg,
      rgba(80,70,50,0.08) 9deg, transparent 10deg
    );
    background-size: 360deg 100%;
    pointer-events: none;
  }

  /* ===== Hour markers ===== */
  .markers {
    position: absolute;
    inset: 0;
    border-radius: 50%;
  }

  .marker {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 12px;
    background: #2a2520;
    transform-origin: 50% 0;
    border-radius: 1px;
  }

  .marker.major {
    width: 3px;
    height: 18px;
    background: #1a1510;
  }

  .marker.minor {
    width: 1.5px;
    height: 8px;
    background: rgba(60, 50, 40, 0.55);
  }

  /* ===== Numerals ===== */
  .numerals {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
  }

  .numeral {
    position: absolute;
    font-size: 18px;
    font-weight: 400;
    color: #2a2520;
    font-family: 'Georgia', serif;
    text-align: center;
    text-shadow: 0 0 2px rgba(255, 255, 240, 0.3);
    letter-spacing: 1px;
  }

  .numeral.roman {
    font-size: 22px;
    font-weight: 400;
    color: #1a1510;
  }

  /* ===== Brand text at 12 ===== */
  .brand {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(40, 35, 25, 0.5);
    text-transform: uppercase;
    font-family: 'Georgia', serif;
    pointer-events: none;
  }

  .sub-brand {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    letter-spacing: 2.5px;
    color: rgba(40, 35, 25, 0.35);
    text-transform: uppercase;
    font-family: 'Georgia', serif;
    pointer-events: none;
  }

  /* ===== Date window ===== */
  .date-window {
    position: absolute;
    bottom: 38px;
    right: 42px;
    width: 52px;
    height: 34px;
    background: linear-gradient(
      135deg,
      #faefd8 0%,
      #efe2c0 50%,
      #d9c9a0 100%
    );
    border: 1.5px solid rgba(60, 50, 40, 0.3);
    border-radius: 4px;
    box-shadow:
      inset 0 1px 3px rgba(255, 255, 240, 0.3),
      inset 0 -1px 2px rgba(0, 0, 0, 0.05),
      0 1px 4px rgba(0, 0, 0, 0.15);
    display: flex;
      align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
  }

  .date-window::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 5px;
    background: linear-gradient(
      135deg,
      rgba(60,50,40,0.15),
      transparent 50%
    );
    pointer-events: none;
  }

  .date-text {
    font-size: 20px;
    font-weight: 600;
    color: #1a1510;
    font-family: 'Georgia', serif;
    line-height: 1;
    text-shadow: 0 0 1px rgba(255,255,240,0.2);
    pointer-events: none;
  }

  .date-window .date-label {
    font-size: 6px;
    letter-spacing: 1px;
    color: rgba(40,35,25,0.3);
    text-transform: uppercase;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Georgia', serif;
  }

  /* ===== Hands ===== */
  .hands {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
  }

  .hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    border-radius: 2px;
    margin-left: -1px;
  }

  .hour-hand {
    width: 5px;
    height: 100px;
    margin-left: -2.5px;
    background: linear-gradient(
      to right,
      #c0b8a0 0%,
      #1a1510 30%,
      #1a1510 70%,
      #c0b8a0 100%
    );
    border-radius: 3px;
    box-shadow:
      0 0 6px rgba(0, 0, 0, 0.3),
      inset 0 1px 2px rgba(255, 255, 240, 0.15);
    /* slight taper via clip-path */
    clip-path: polygon(
      20% 0%, 80% 0%,
      100% 100%, 0% 100%
    );
  }

  .minute-hand {
    width: 4px;
    height: 130px;
    margin-left: -2px;
    background: linear-gradient(
      to right,
      #d0c8b0 0%,
      #252018 30%,
      #252018 70%,
      #d0c8b0 100%
    );
    border-radius: 2px;
    box-shadow:
      0 0 5px rgba(0, 0, 0, 0.25),
      inset 0 1px 2px rgba(255, 255, 240, 0.12);
    clip-path: polygon(
      25% 0%, 75% 0%,
      100% 100%, 0% 100%
    );
  }

  .seconds-hand {
    width: 2px;
    height: 120px;
    margin-left: -1px;
    background: linear-gradient(
      to right,
      rgba(200, 180, 150, 0.3) 0%,
      #b8301a 20%,
      #b8301a 80%,
      rgba(200, 180, 150, 0.3) 100%
    );
    border-radius: 1px;
    box-shadow:
      0 0 4px rgba(180, 48, 26, 0.2),
      inset 0 0 2px rgba(255, 255, 240, 0.1);
    transition: transform 0.05s linear;
  }

  /* seconds hand counterweight (tail) */
  .seconds-hand::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5px;
    height: 8px;
    background: #b8301a;
    border-radius: 1px;
    box-shadow: 0 0 3px rgba(180, 48, 26, 0.25);
  }

  /* center cap */
  .center-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: radial-gradient(
      circle at 40% 35%,
      #e0d8c8 0%,
      #908070 50%,
      #5a4a3a 100%
    );
    border-radius: 50%;
    box-shadow:
      0 0 0 2px #2a2520,
      0 2px 6px rgba(0, 0, 0, 0.3),
      inset 0 1px 2px rgba(255, 255, 240, 0.2);
    z-index: 3;
  }

  .center-cap::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: radial-gradient(
      circle at 40% 35%,
      #f0e8d8 0%,
      #807060 100%
    );
    border-radius: 50%;
  }

  /* ===== Lugs (strap attachment) ===== */
  .lug {
    position: absolute;
    background: linear-gradient(
      135deg,
      #d8d8e0 0%,
      #b0b0bc 50%,
      #c8c8d2 100%
    );
    box-shadow:
      0 4px 10px rgba(0, 0, 0, 0.4),
      inset 0 1px 2px rgba(255, 255, 255, 0.2);
  }

  .lug-top {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    border-radius: 4px 4px 0 0;
  }

  .lug-bottom {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    border-radius: 0 0 4px 4px;
  }

  /* ===== Strap ===== */
  .strap {
    position: absolute;
    width: 100px;
    background: linear-gradient(
      to bottom,
      #1a1a1e 0%,
      #2a2a2e 20%,
      #1a1a1e 40%,
      #2a2a2e 60%,
      #1a1a1e 80%,
      #2a2a2e 100%
    );
    box-shadow:
      inset 0 0 8px rgba(0, 0, 0, 0.3),
      0 4px 10px rgba(0,0,0,0.3);
    overflow: hidden;
  }

  .strap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0px,
      rgba(255,255,255,0.04) 2px,
      transparent 4px
    );
    pointer-events: none;
  }

  .strap-top {
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    height: 50px;
    border-radius: 0 0 4px 4px;
    border-top: 2px solid #3a3a40;
  }

  .strap-bottom {
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    height: 50px;
    border-radius: 4px 4px 0 0;
    border-bottom: 2px solid #3a3a40;
  }

  .strap-stitch {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 1px;
  }

  .strap-top .strap-stitch,
  .strap-bottom .strap-stitch {
    height: 100%;
    background: repeating-linear-gradient(
      to bottom,
      transparent 0px,
      rgba(255,255,255,0.08) 2px,
      transparent 4px,
      rgba(255,255,255,0.08) 6px,
      transparent 8px
    );
  }

  /* ===== Sub-dial (running seconds / chronograph feel) ===== */
  .sub-dial {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(
      circle at 50% 40%,
      #e8dfc8 0%,
      #d9cfb0 100%
    );
    border: 1px solid rgba(60, 50, 40, 0.2);
    box-shadow:
      inset 0 0 8px rgba(120, 100, 60, 0.1),
      0 1px 3px rgba(0,0,0,0.08);
    pointer-events: none;
    z-index: 2;
  }

  .sub-dial .sub-tick {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 6px;
    background: rgba(40,35,25,0.3);
    transform-origin: 50% 0;
  }

  .sub-dial .sub-tick.major {
    height: 8px;
    width: 1.5px;
    background: rgba(40,35,25,0.5);
  }

  .sub-dial .sub-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5px;
    height: 18px;
    margin-left: -0.75px;
    margin-top: -18px;
    background: #2a2520;
    border-radius: 1px;
    transform-origin: 50% 100%;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
    pointer-events: none;
  }

  .sub-dial .sub-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 3px;
    background: radial-gradient(circle at 40% 35%, #e0d8c8, #605040);
    border-radius: 50%;
  }

  .sub-dial .sub-numeral {
    position: absolute;
    font-size: 6px;
    color: rgba(40,35,25,0.3);
    font-family: 'Georgia', serif;
    pointer-events: none;
  }

  /* ===== Glow reflection on glass ===== */
  .glass-reflection {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(
      ellipse at 25% 20%,
      rgba(255, 255, 255, 0.12) 0%,
      rgba(255, 255, 255, 0.03) 30%,
      transparent 50%
    );
    pointer-events: none;
    z-index: 6;
    mix-blend-mode: screen;
  }

  /* subtle outer ring glow */
  .watch-case::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(
      circle at 30% 25%,
      rgba(255,255,255,0.08) 0%,
      transparent 50%
    );
    pointer-events: none;
    z-index: -1;
  }

  /* ===== Responsive ===== */
  @media (max-width: 440px) {
    .watch-case {
      width: 300px;
      height: 300px;
    }
    .crown {
      right: -22px;
      width: 14px;
      height: 36px;
    }
    .pusher-top,
    .pusher-bottom {
      right: -18px;
      width: 8px;
      height: 8px;
    }
    .numeral {
      font-size: 14px;
    }
    .numeral.roman {
      font-size: 18px;
    }
    .date-window {
      width: 42px;
      height: 28px;
      bottom: 30px;
      right: 32px;
    }
    .date-text {
      font-size: 16px;
    }
    .hour-hand {
      height: 80px;
    }
    .minute-hand {
      height: 105px;
    }
    .seconds-hand {
      height: 96px;
    }
    .brand {
      font-size: 8px;
      top: 14px;
    }
    .sub-brand {
      font-size: 6px;
      bottom: 16px;
    }
    .strap {
      width: 80px;
    }
    .strap-top {
      height: 40px;
      top: -28px;
    }
    .strap-bottom {
      height: 40px;
      bottom: -28px;
    }
    .sub-dial {
      width: 40px;
      height: 40px;
      top: 22px;
    }
    .lug-top,
    .lug-bottom {
      width: 48px;
      height: 16px;
    }
  }
</style>
</head>
<body>

<div class="watch-case">
  <div class="crown"></div>
  <div class="pusher-top"></div>
  <div class="pusher-bottom"></div>

  <div class="lug lug-top"></div>
  <div class="lug lug-bottom"></div>

  <!-- Strap -->
  <div class="strap strap-top">
    <div class="strap-stitch"></div>
  </div>
  <div class="strap strap-bottom">
    <div class="strap-stitch"></div>
  </div>

  <!-- Dial -->
  <div class="dial">
    <!-- chapter ring texture -->
    <div class="chapter-ring"></div>

    <!-- Brand text -->
    <div class="brand">APEX CHRONOMETER</div>
    <div class="sub-brand">GENEVA · MADE IN SWITZERLAND</div>

    <!-- Date window -->
    <div class="date-window">
      <span class="date-text" id="dateDisplay">01</span>
      <span class="date-label">DATE</span>
    </div>

    <!-- Sub-dial at 12 for running seconds -->
    <div class="sub-dial" id="subDial">
      <div class="sub-tick major" style="transform: rotate(0deg) translateY(-100%)"></div>
      <div class="sub-tick major" style="transform: rotate(60deg) translateY(-100%)"></div>
      <div class="sub-tick major" style="transform: rotate(120deg) translateY(-100%)"></div>
      <div class="sub-tick major" style="transform: rotate(180deg) translateY(-100%)"></div>
      <div class="sub-tick major" style="transform: rotate(240deg) translateY(-100%)"></div>
      <div class="sub-tick major" style="transform: rotate(300deg) translateY(-100%)"></div>
      <div class="sub-tick" style="transform: rotate(30deg) translateY(-100%)"></div>
      <div class="sub-tick" style="transform: rotate(90deg) translateY(-100%)"></div>
      <div class="sub-tick" style="transform: rotate(150deg) translateY(-100%)"></div>
      <div class="sub-tick" style="transform: rotate(210deg) translateY(-100%)"></div>
      <div class="sub-tick" style="transform: rotate(270deg) translateY(-100%)"></div>
      <div class="sub-tick" style="transform: rotate(330deg) translateY(-100%)"></div>
      <div class="sub-hand" id="subHand"></div>
      <div class="sub-center"></div>
    </div>

    <!-- Markers -->
    <div class="markers" id="markers"></div>

    <!-- Numerals -->
    <div class="numerals" id="numerals"></div>

    <!-- Hands -->
    <div class="hands">
      <div class="hand hour-hand" id="hourHand"></div>
      <div class="hand minute-hand" id="minuteHand"></div>
      <div class="hand seconds-hand" id="secondsHand"></div>
      <div class="center-cap"></div>
    </div>
  </div>

  <!-- Crystal glass -->
  <div class="crystal"></div>
  <div class="glass-reflection"></div>
</div>

<script>
(function () {
  'use strict';

  // ---- Generate markers ----
  const markersContainer = document.getElementById('markers');
  const totalMarks = 60; // tick marks every 6 degrees
  for (let i = 0; i < totalMarks; i++) {
    const angle = i * 6;
    const isMajor = i % 5 === 0;
    const marker = document.createElement('div');
    marker.className = 'marker' + (isMajor ? ' major' : ' minor');
    marker.style.transform = 'rotate(' + angle + 'deg)';
    marker.style.bottom = isMajor ? '8%' : '14%';
    marker.style.left = '50%';
    marker.style.width = isMajor ? '3px' : '1.5px';
    marker.style.height = isMajor ? '16px' : '7px';
    marker.style.marginLeft = '-1px';
    marker.style.borderRadius = isMajor ? '2px' : '1px';
    markersContainer.appendChild(marker);
  }

  // ---- Generate Roman numerals at 1-12 positions ----
  const numeralsContainer = document.getElementById('numerals');
  const romanMap = {
    1: 'I', 2: 'II', 3: 'III', 4: 'IIII', 5: 'V',
    6: 'VI', 7: 'VII', 8: 'VIII', 9: 'IX', 10: 'X',
    11: 'XI', 12: 'XII'
  };

  // Place numerals at 5-minute positions (30° apart)
  for (let i = 1; i <= 12; i++) {
    const angle = i * 30 - 90; // start from 12 o'clock
    const rad = angle * Math.PI / 180;
    const radiusPct = 76; // percent of half the dial
    const halfDim = 50; // percent
    const x = 50 + radiusPct * Math.cos(rad) / 100 * 50;
    const y = 50 + radiusPct * Math.sin(rad) / 100 * 50;

    const el = document.createElement('div');
    el.className = 'numeral roman';
    el.textContent = romanMap[i];
    el.style.left = (x - 10) + '%';
    el.style.top = (y - 8) + '%';
    el.style.transform = 'scale(1)';
    // subtle orientation: keep numerals upright
    el.style.transform = 'translate(-50%, -50%)';
    numeralsContainer.appendChild(el);
  }

  // ---- Date display ----
  const dateEl = document.getElementById('dateDisplay');

  // ---- Hands ----
  const hourHand = document.getElementById('hourHand');
  const minuteHand = document.getElementById('minuteHand');
  const secondsHand = document.getElementById('secondsHand');
  const subHand = document.getElementById('subHand');

  // ---- Tick ----
  function updateClock() {
    const now = new Date();

    const hours = now.getHours();
    const minutes = now.getMinutes();
    const seconds = now.getSeconds();
    const milliseconds = now.getMilliseconds();

    // Smooth angles
    const secondAngle = seconds * 6 + milliseconds * 0.006;
    const minuteAngle = (minutes + seconds / 60) * 6;
    const hourAngle = ((hours % 12) + minutes / 60) * 30;

    // Main hands
    secondsHand.style.transform = 'rotate(' + secondAngle + 'deg)';
    minuteHand.style.transform = 'rotate(' + minuteAngle + 'deg)';
    hourHand.style.transform = 'rotate(' + hourAngle + 'deg)';

    // Sub-dial running seconds (matches main seconds)
    subHand.style.transform = 'rotate(' + secondAngle + 'deg)';

    // Date
    const day = now.getDate();
    dateEl.textContent = day < 10 ? '0' + day : '' + day;
  }

  // Initial draw
  updateClock();

  // Smooth animation loop for sweeping seconds
  let lastTime = performance.now();
  function tick() {
    const now = performance.now();
    if (now - lastTime >= 16) {
      updateClock();
      lastTime = now;
    }
    requestAnimationFrame(tick);
  }
  requestAnimationFrame(tick);
})();
</script>

</body>
</html>

Compare

Other runs