Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Allow a StopWatch to carry an optional message such that it is included as a prefix to toString and toSplitString methods if present. Quite handy for subclassing.
The behavior does not change if no message is supplied.
For example:
StopWatch stopWatch = new StopWatch("Baking cookies"); stopWatch.start(); ...
Calling:
stopWatch.toString(); stopWatch.toSplitString();
returns the message as a prefix. for example:
"Baking cookies 00:01:22.333"