From 7425fdddcc1661043040b6042d6a2f392ad47749 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 29 Dec 2012 07:58:31 -0600 Subject: [PATCH] sh/stopwatch: utilize customizable message callback for event spam --- lib/sh/stopwatch.sh | 68 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 8 deletions(-) diff --git a/lib/sh/stopwatch.sh b/lib/sh/stopwatch.sh index 59e6785..3257d7e 100644 --- a/lib/sh/stopwatch.sh +++ b/lib/sh/stopwatch.sh @@ -74,6 +74,21 @@ stopwatch_humany_duration Transform an integer number of microseconds into a human-readable string (Ex: 3d14h10m3.223s or 7m10.013s ) +stopwatch_set_message_callback + Register a callback to format event messages emitted when a stopwatch is + commanded. The callback will receive the following parameters: + - one of: starting, started, lap, get, stopping, stopped, reset + - stopwatch name +