Add template to check if a timer is expired

This commit is contained in:
Raycho Mukelov 2023-08-10 11:36:13 +03:00
parent 4e333f32b4
commit 85e4d19e59
1 changed files with 5 additions and 0 deletions

View File

@ -77,3 +77,8 @@ proc RaftCreateTimer*[TimerDurationType](d: TimerDurationType, repeat: bool, tim
template RaftCancelTimer*(TimerId) =
mixin RaftCancelTimerCustomImpl
RaftCancelTimerCustomImpl(TimerId)
template RaftIsExpiredTimer*(TimerId): bool =
mixin RaftIsExpiredTimerImpl
RaftIsExpiredTimerImpl(TimerId)