Here’s an example
Example 1
SetTimer 3 sec
IsActive? True
IsValid? True
After 4 secs
IsActive? False (Why? Timer has executed already, it is now invalid)
IsValid? Unsure (could be True or False)
(No need to call ClearAndInvalidateTimerByHandle here)
Example 2
SetTimer 3 sec
IsActive? True
IsValid? True
After 2 secs
IsActive? True
IsValid? True
ClearAndInvalidateTimerByHandle
IsActive? False (Why? Timer has been invalidated it is now invalid)
IsValid? Unsure (could be True or False)
In summary, never use IsValid for checking the active status of a timer. Use IsTimerActiveByHandle instead.