Browse the docs

microseconds

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

Keyboard Maestro: MICROSECONDS

Details #

microseconds() takes no arguments and returns the time since the Mac started, in microseconds. The result is rounded to a whole number.

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. {{ microseconds() }}

Examples #

microseconds()
→ 462185289452
microseconds() > 0
→ true

Gotchas #

  • Passing an argument is an error: microseconds() 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.