-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom TimeUnits in StopWatch #25803
Comments
Thanks for creating this issue. I can see that this might be useful in some use cases, but this enhancement does not currently have high priority for us. Thus, I have assigned it to the General Backlog to allow this issue to gain interest from the community. |
@sbrannen It alright if I work on this issue? |
# Conflicts: # spring-core/src/test/java/org/springframework/util/StopWatchTests.java
I ended up switching the default time unit for String renderings to seconds with decimal points in nanosecond precision since the scale is easier to see then, while retaining the same precision level as in the 5.2 revision. Custom renderings with specific time units can be requested through The |
I use
spring-core:5.2.9.RELEASE
.When I invoke
StopWatch#prettyPrint
,I want
StopWatch
to providesetTimeUnit(java.util.concurrent.TimeUnit)
,getLastTime(TimeUnit)
andgetTotalTime(TimeUnit)
; the return type of these methods isdouble
.For example,
is like ...
Thanks!
The text was updated successfully, but these errors were encountered: