Browse the docs

milliseconds

Returns how long the Mac has been running, in milliseconds.

Keyboard Maestro: MILLISECONDS

Details #

milliseconds() takes no arguments and returns the time since the Mac started, in milliseconds. The result has decimals.

It is a stopwatch, not a clock: it has no date. Read it before and after something and subtract to see how long that took. For the date and time of day, use now or time.

Parameters #

Takes 0 arguments. {{ milliseconds() }}

Examples #

milliseconds()
→ 4.62185e+08
milliseconds() > 0
→ true

Gotchas #

  • Passing an argument is an error: milliseconds() takes 0 arguments, got 1.

  • It counts from when the Mac started, so the number is large and differs on every Mac.

  • Reading it twice in one expression can give two slightly different values.