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:49:00 UTC

[jira] [Updated] (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 updated LANG-1506:
----------------------------------
    Description: 
Allow a StopWatch to carry an optional message such that it is included as a prefix to {{toString}} and {{toSplitString}} methods if present.

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}

  was:
Allow a StopWatch to carry an optional message such that it is included as a prefix to {{toString}} and {{toSplitString}} methods if present.

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}


> 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
>
> Allow a StopWatch to carry an optional message such that it is included as a prefix to {{toString}} and {{toSplitString}} methods if present.
> 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)