Vlad Mihalcea (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-13879 (
https://hibernate.atlassian.net/browse/HHH-13879?atlOrigin=eyJpIjoiMThmOD...
)
Re: Slow query log should use System#nanoTime not System#currentTimeMillis (
https://hibernate.atlassian.net/browse/HHH-13879?atlOrigin=eyJpIjoiMThmOD...
)
Sanne Grinovero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) The major problem with currentTimeMillis() is that the result is affected by NTP, so you
could end up with negative durations. Bitronix was developed by Ludovic and Brett, and
Brett has also switched to using nanoTime in HikariCP (
https://github.com/brettwooldridge/HikariCP/issues/215 ).
Frankly, I’m not aware of any nonoTime() issue. From all the source code I checked, it
seems everyone is using it for durations. That’s why I asked you if you can provide more
details about the nonoTime() problem you are worried about?
The only problem I’m now aware of is that, on some systems, if the OS does not support
monotonic clocks, nanoTime will fall back to wall clock time, just like
currentTimeMillis(). But, the major Operating Systems do support monotonic clocks.
(
https://hibernate.atlassian.net/browse/HHH-13879#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13879#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:a269fed )