IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

time

Timing operations: monotonic clocks, performance counters, sleep, time_function.

The time package provides utilities for measuring elapsed time, benchmarking code performance, and introducing delays. It offers monotonic clocks that are unaffected by system clock adjustments, making them suitable for measuring intervals and profiling execution time.

Use this package for performance measurement, benchmarking, profiling, or when you need to introduce delays in your code.

Modules

  • time: Implements basic utils for working with time.