RFR: 8273239: Standardize Ticks APIs return type
David Holmes
dholmes at openjdk.java.net
Thu Sep 2 02:44:26 UTC 2021
On Wed, 1 Sep 2021 14:38:52 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Simple change on return types of Ticks API.
>
> The call of `milliseconds()` in `spinYield.cpp` seems a bug to me, because the unit in the message is `usecs`. Therefore, I changed it to `microseconds()`.
>
> Test: tier1
Sorry Albert but I don't see this as an improvement at all. When people ask for the time in ms/us/ns they expect integral values and forcing all the clients to do the casting is counter productive. If there is code that wants a time in say ms + us + ns then they can call seconds() and do the conversion themselves IMO.
Cheers,
David
-------------
PR: https://git.openjdk.java.net/jdk/pull/5332
More information about the hotspot-dev
mailing list