Slightly faster implementation of the deadman counter