commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1223) StopWatch should provide getTime() which accepts TimeUnit
Date Fri, 27 May 2016 08:50:12 GMT

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

ASF GitHub Bot commented on LANG-1223:
--------------------------------------

Github user PascalSchumacher commented on the pull request:

    https://github.com/apache/commons-lang/pull/152#issuecomment-222094283
  
    Thanks for updating the pull request.
    
    Yes, the `StopWatch` implementation is not really testable. :(
    
    I think the best approach would be to use reflection to set the times (e.g. by using `FieldUtils#writeField`).
    



> StopWatch should provide getTime() which accepts TimeUnit
> ---------------------------------------------------------
>
>                 Key: LANG-1223
>                 URL: https://issues.apache.org/jira/browse/LANG-1223
>             Project: Commons Lang
>          Issue Type: Improvement
>            Reporter: Ted Yu
>            Priority: Minor
>
> I was migrating code which used Guava Stopwatch to using org.apache.commons.lang.time.StopWatch
> {code}
>    double throughputCells = (double)numCells / scanTimer.elapsedTime(TimeUnit.SECONDS);
> {code}
> I had to do conversion after calling getTime().
> StopWatch should provide getTime() which accepts TimeUnit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message