File utils/stopwatch.lua
Functions
stopwatch.start (watch_name) | Start a watch with the given name. |
stopwatch.stop (watch_name, message) | Stops the watch with the given name, logging the duration. |
Functions
- stopwatch.start (watch_name)
-
Start a watch with the given name.
Parameters
- watch_name: The name of the watch to start.
- stopwatch.stop (watch_name, message)
-
Stops the watch with the given name, logging the duration. It will be logged as info in the format "watch_name: duration ms" or if the message is provided "message: duration ms"
Parameters
- watch_name: The name of the watch to stop.
- message: Optional. The message to use for the log instead of the name.