What is the difference between java.util.Timer and ej.bon.Timer


#1

I want to use a Timer in my project, but I do not know how to choose between java.util.Timer and ej.bon.Timer. Could you please tell me how to decide whether I should use the former or the latter?


#2

Hello @mmoss!

Always use ej.bon.Timer.

Unlike java.util.Timer, ej.bon.Timer is based on a monotonic clock: it will always give a consistent time, regardless of external factors such as timezones, user settings, NTP adjustment, etc.

Regards,