[crac] RFR: Correct System.nanotime() value after restore [v3]
Radim Vansa
duke at openjdk.org
Fri Apr 14 07:13:09 UTC 2023
On Thu, 13 Apr 2023 15:19:12 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:
>> My concern here about this code. This code assumes multiple cycles possible, and does something in not straightforward way. I think we'd better streamline this code (assuming repeated cycles, or not).
>>
>> Should not we just record checkpoint millis and nanos unconditionally?
>
>> It estabilishes relation between real time and monotonic time, and it's sufficient to do that just once
>
> I don't belive this is true. Real time can be squezed and extended https://man7.org/linux/man-pages/man3/adjtime.3.html. So it won't be correct to apply a difference in real time to the monotonic clock to calculate the value of monotonic clock in another point of time.
Alright then, changing wall clock time might be of concern, and I realized it should work even when this is set every time. I'll update it.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/53#discussion_r1166383397
More information about the crac-dev
mailing list