commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keegan Witt (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1359) add getStopTime to StopWatch
Date Sat, 17 Mar 2018 21:15:00 GMT

    [ https://issues.apache.org/jira/browse/LANG-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16403734#comment-16403734
] 

Keegan Witt commented on LANG-1359:
-----------------------------------

I'm not looking to get the elapsed time.  I'm looking to get the ending time.  So if I were
manually coding a stopwatch,

{code:java}

long start = new Date().getTime();

// stuff that happens between start and stop

long stop = new Date().getTime();

long elapsed = stop - start;

{code}
In my case, I'd be looking for the {{stop}} long.

> add getStopTime to StopWatch
> ----------------------------
>
>                 Key: LANG-1359
>                 URL: https://issues.apache.org/jira/browse/LANG-1359
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Keegan Witt
>            Priority: Minor
>
> Someone I know recently had a use case where they needed to retrieve the stopTime for
a timer.  I know this could be inferred from
> {code:java}
> stopWatch.getStartTime() + stopWatch.getTime();
> {code}
> but it might be nice to just add a getter.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message