VOOZH about

URL: https://minecraft.wiki/w/Stopwatch

⇱ /stopwatch – Minecraft Wiki


/stopwatch

From Minecraft Wiki
(Redirected from Stopwatch)
Jump to navigation Jump to search
This feature is exclusive to Java Edition.
 
This article is a stub.
 
You can help by expanding it. The talk page may contain suggestions.
/stopwatch
Permission level
required
2
Restrictions None
{
 "title": "<code>/stopwatch</code>",
 "rows": [
 {
 "field": "2",
 "label": "(link to Permission level article, displayed as Permission level<br>required)"
 },
 {
 "field": "None",
 "label": "(link to Commands#Restrictions article, displayed as Restrictions)"
 }
 ],
 "invimages": [],
 "images": []
}

Allows manipulation of stopwatches to keep track of real time — the time measured is not affected by the game's tick rate (i.e. pausing, /tick, or even server lag).

The time is calculated with millisecond precision. Therefore:

  • When displayed, it is presented in seconds with 3 decimal places (e.g. 43.961s).
  • While any integer value can be used as the scale argument, a scale with absolute value >1000 is not useful to extract additional precision in the integer return value.

Syntax

[edit | edit source]
  • Java Edition
stopwatch create <id> - Creates a stopwatch, which immediately begins running
stopwatch query <id> <scale> - Gets the value of the stopwatch, the amount of time since it was created/restarted. scale does not affect the displayed value in chat, but does affect the value returned e.g. for /execute store result.... If the return value would exceed 32-bit signed integer limits (<-2147483648 or >2147483647), it is clamped.
stopwatch restart <id> - Restarts a stopwatch
stopwatch remove <id> - Removes a stopwatch

History

[edit | edit source]
Java Edition
1.21.1125w41aAdded /stopwatch.
25w42aSwitched the order of the id argument.
query now returns the queried value.
Added the scale argument to query.

Navigation

[edit | edit source]
Retrieved from "https://minecraft.wiki/w/Commands/stopwatch?oldid=3563809"

Navigation menu