Crate breezy_timer[][src]

Macros

elapsed_ns

Returns the amount of nanoseconds elapsed by the timer with the provided name. If feature breezy_timer is not active, returns 0 (to avoid breaking code which depends on the output)

get_timers_map

Returns the hashmap containing each timer. The key corresponds to the timer name, and the value is an instance of TimerState. If feature breezy_timer is not active, return an empty HashMap (to avoid breaking code which depends on the output)

prepare_timer

Prepares the global variable TIMERS. Must be called before any other macro from this crate, or the other calls will panic

start_timer

Creates or updates a timer with the provided name. The same timer can be started and stopped as many times as needed, and will keep track of the sum of all the time spent

stop_timer

Stops the timer with the provided name. The timer must already exist, or this call will panic. The same timer can be started and stopped as many times as needed, and will keep track of the sum of all the time spent

Structs

Global

A mutable global value.

HashMap

A hash map implemented with quadratic probing and SIMD lookup.

ProcessTime

CPU Time Used by The Whole Process

TimerState

Structure used to keep track of the current process time since the last start_timer!() call, as well as the sum of all previously calculated times.

Functions

clone_hashmap

Helper function to clone a hashmap, needed by the macro get_timers_map!()