シンプル タイマー
分・秒を指定する簡易カウントダウンタイマー。
シンプル タイマーとは
シンプル タイマーは、分と秒を指定してリアルタイムのカウントダウンを表示する無料ツールです。プログレスバーと残り時間が 250 ミリ秒ごとに更新され、0 になると「Time's up!」と表示されます。タイマーはブラウザ内だけで動作し、アラーム音は鳴りません。ポモドーロや短時間の作業計測に使えます。
🔒 処理はすべてブラウザ内で完結し、データは送信されません。
このツールの前提
- 処理場所
- このページのブラウザ内(JavaScript / Canvas)
- アップロード
- なし — ファイルは端末の外に出ません
- オフライン
- ページを開いた後は通信不要
A timer is not a clock
setInterval and setTimeout schedule a callback, but they do not guarantee when it runs. The interval is a minimum delay, not a period: a busy main thread delays every tick, and the drift accumulates. Over ten minutes of animation, a naive counter can be seconds behind.
The correct pattern is to compare against a wall-clock start time on every tick — remaining = deadline − Date.now() — rather than decrementing a counter. That way a delayed tick corrects itself instead of adding to the error.
Background tabs are throttled
Browsers reduce timer frequency in hidden tabs, to as little as once per minute in some configurations, and suspend them entirely on mobile with the screen off. A timer that counts down by ticking will appear to have paused when the tab was in the background, then resume from the wrong value.
Computing from the deadline fixes this too, and firing on visibilitychange to resync makes the display correct the moment the user returns. Timers that must run regardless of tab state belong in a worker or on the server.
Sleep, and the tab that was closed
A suspended laptop stops the clock that setTimeout is measured against in some environments, and resumes with an overdue callback. The deadline approach handles it: on resume the remaining time is computed from real elapsed time, which is what the user expects to see.
Nothing in a page survives being closed. If a timer must be reliable — a pomodoro across a browser restart, a deadline reminder — the deadline has to be persisted (localStorage, or a server-side record) and re-read on load. A running interval is state that exists only while the page does.
使い方
- 1.分と秒を入力
- 2.実行する
- 3.カウントダウンが進み、0 で Time's up 表示
シンプル タイマーの仕組み
ここでの計算ツールはタブ内で計算し、結果の隣に式を表示します。数値を信じるのではなく検算できます。
- 1
入力を読む
値は単位を明示して数値として解析します。不正な入力は 0 に丸めず拒否します。
- 2
式を適用
計算は純関数なので、同じ入力は常に同じ結果になります。
- 3
計算過程を表示
式と中間値が結果と一緒に表示され、各段階を確認できます。
処理の流れ
丸めは隠さない
表示は丸めますが、以降の計算には丸めていない値を使います。1 セント単位で重要な数値なら、どの丸めを適用したかを確認してください。結果の隣に明記しています。
分からないこと
計算ツールは契約条件・地域の税規則・個別の割引率を知りません。入力されたものを計算するだけであり、前提の確認は利用者の側にあります。
自分で確かめる
表示された式から、すべての数値を手計算で再現できます。
- 1.このページで DevTools を開き、Network タブを選ぶ
- 2.フィルタを Fetch/XHR に設定したままツールを実行する
- 3.ファイルの中身を含むリクエストが 1 件も無いことを確認する(ページの読み込みとフォントだけが表示されます)
よくある質問
最大の設定時間は?
最長 24 時間です。1 秒以上の任意の分・秒を設定できます。
アラームは鳴る?
音は鳴りません。画面上のカウントと Time's up 表示のみです。タブを別のページに移すとバックグラウンドでも計測は続きます(ターゲット時刻ベース)。
この変換で失われるもの
計算ツールは結果だけでなく使用した式も表示します。納得できない結果を、ブラックボックスとして捨てるのではなく、一行ずつ検算できます。