Generates a timer object that logs the elapsed time after its stop function is called.
Call example: myTimer = timer("egg cooking"); cookEgg(); timer.stop("successfull");
*
Parameters
name: string
identifies the timer
*
Returns {stop:(message?:string)=>void}
the timer object with the stop(message) function. The message is optional.
Generates a timer object that logs the elapsed time after its stop function is called. Call example: myTimer = timer("egg cooking"); cookEgg(); timer.stop("successfull"); *