public static Duration adjustTimeoutByDetectedHz(Duration timeout, long hz) {
        return  timeout.multipliedBy(1000).dividedBy(hz);
    }
This is an implementation of {@link Timer} that is backed by an actual system timer.

@author Simon Thoresen Hult
vespajlib/src/main/java/com/yahoo/concurrent/SystemTimer.java