Closed lategoodbye closed 7 years ago
I see what you mean. This is a corner case since the NTP would need to change within the first 20s of a communication setup because that's where System.currentTimeMillis() is used. But it's a good catch and I will change it with the next release.
Issue resolved with commit f301e82
Rise V2G uses System.currentTimeMillis() to measure timings, which based on the current system time. This could leads to hard reproducible runtime issues, because e.g. NTP could change the system time and influence the result of System.currentTimeMillis().
In order to avoid this always use System.nanoTime() for time measuring, which is recommend by Oracle for this use case.