AB-xdev created LANG-1761:
-----------------------------
Summary: StopWatch: Undeprecate ``getTime``
Key: LANG-1761
URL: https://issues.apache.org/jira/browse/LANG-1761
Project: Commons Lang
Issue Type: Improvement
Components: lang.time.*
Affects Versions: 3.17.0, 3.16.0
Reporter: AB-xdev
The StopWatch {{getTime}} method [was deprecated in
3.16.0|https://github.com/apache/commons-lang/blob/08988a2c9029b1625115b3e3c6d30cb0fd1de57a/src/changes/changes.xml#L132-L135].
We have some problems with the deprecation and would like to have it reverted:
* We're unable to find the exact reasons for the deprecation because there is
no issue/PR with further explanation. So for us it is not comprehensible.
* {{getTime}} is a lot shorter as writing {{getDuration().toMillis()}} or
{{getTime(TimeUnit.MILLISECONDS)}}
* According to our tests {{getTime}} is around 10% faster than
{{getDuration().toMillis()}} (as it just divides 2 longs instead of
instantiating a new object)
* The method has been present for the last 22 years and is well established.
Changing it would result in a lot of code changes for us.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)