LANG-1223: Add StopWatch#getTime(TimeUnit)

add since java doc tag and changes.xml entry
This commit is contained in:
pascalschumacher 2016-05-27 17:13:03 +02:00
parent fd59e545f4
commit 2244ed9d63
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@
<body>
<release version="3.5" date="tba" description="tba">
<action issue="LANG-1223" type="add" dev="pschumacher" due-to="Nick Manley">Add StopWatch#getTime(TimeUnit)</action>
<action issue="LANG-781" type="add" dev="pschumacher" due-to="Krzysztof Wolny">Add methods to ObjectUtils class to check for null elements in the array</action>
<action issue="LANG-1228" type="add" dev="pschumacher" due-to="Brad Hess">Prefer Throwable.getCause() in ExceptionUtils.getCause()</action>
<action issue="LANG-1233" type="add" dev="pschumacher" due-to="Nick Manley">DiffBuilder add method to allow appending from a DiffResult</action>

View File

@ -351,6 +351,7 @@ public class StopWatch {
*
* @param timeUnit the unit of time, not null
* @return the time in the specified TimeUnit, rounded down
* @since 3.5
*/
public long getTime(final TimeUnit timeUnit) {
return timeUnit.convert(getNanoTime(), TimeUnit.NANOSECONDS);