CheckLatency/MaxLatency (taken from #141)