chiark / gitweb /
dice: Set cooldown_expiry to None when we can
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 12:04:37 +0000 (13:04 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 21:43:43 +0000 (22:43 +0100)
commitc0f5ee0cf74d0f60ab06d6e70649cbd2b10eeceb
tree1264b35714ab54d8a64a1b20c008ffdc1b039f46
parente9e6a9aaf87ae42e591ddd03ba7aa55b4a45b026
dice: Set cooldown_expiry to None when we can

This will avoid pointless calls to Instant::now, which would otherwise
be needed to discover that the cooldown time has expired (perhaps long
ago).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/dice.rs