[crac] RFR: Correct System.nanotime() value after restore [v4]

Radim Vansa duke at openjdk.org
Fri Apr 21 14:57:13 UTC 2023


On Fri, 21 Apr 2023 14:44:39 GMT, Anton Kozlov <akozlov at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Set nanotime only if bootid changes
>
> src/hotspot/share/runtime/os.cpp line 2055:
> 
>> 2053:     // Make the javaTimeNanos() on the next line return true monotonic time
>> 2054:     javaTimeNanos_offset = 0;
>> 2055:     javaTimeNanos_offset = checkpoint_nanos - javaTimeNanos() + diff_millis * 1000000L;
> 
> First assignment does not make effect.

It does; `javaTimeNanos()` uses `javaTimeNanos_offset` underhood.

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/53#discussion_r1173872701


More information about the crac-dev mailing list