You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2019/12/30 19:54:00 UTC

[jira] [Resolved] (LANG-1506) Allow a StopWatch to carry an optional message.

     [ https://issues.apache.org/jira/browse/LANG-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory resolved LANG-1506.
-----------------------------------
    Fix Version/s: 3.10
       Resolution: Fixed

> Allow a StopWatch to carry an optional message.
> -----------------------------------------------
>
>                 Key: LANG-1506
>                 URL: https://issues.apache.org/jira/browse/LANG-1506
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.time.*
>            Reporter: Gary D. Gregory
>            Assignee: Gary D. Gregory
>            Priority: Major
>             Fix For: 3.10
>
>
> 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:
> {code:java}
> StopWatch stopWatch = new StopWatch("Baking cookies");
> stopWatch.start();
> ...
> {code}
> Calling:
> {code:java}
> {{stopWatch.toString()}} 
> {code}
> returns:
> {code:java}
> "Baking cookies 00:01:22.333"
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)