Is there any consistent (monotonic) Clock implementation in Java?

As @the8472 says, the key is to have the time synchronization on the machine (where the jvm runs) correct.

If you program a client then it really can be dangerous to rely on the system clocks.
But for servers, there is a solution – you might want to consider using NTP with strict configuration.

In here they basicly explain that NTP will slow down the time and not set it backwards.

And this NTP documentation says :

Sometimes, in particular when ntpd is first started, the error might
exceed 128 ms. This may on occasion cause the clock to be set
backwards if the local clock time is more than 128 s in the future
relative to the server. In some applications, this behavior may be
unacceptable. If the -x option is included on the command line, the
clock will never be stepped and only slew corrections will be used.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)