RealDocs

FTimerManager::IsTimerPaused

function Engine Since 4.0
#include "TimerManager.h"
Access: public Specifiers: inline

Description

Returns true if the specified timer exists and is currently in the paused state. Returns false if the timer does not exist or is active/pending.

Caveats & Gotchas

  • Returns false for non-existent timers — you cannot distinguish between 'paused' and 'never set' without also calling TimerExists.
  • A timer in the ETimerStatus::Executing state (currently firing its callback) is not considered paused, even if you call PauseTimer during the callback.

Signature

inline bool IsTimerPaused(FTimerHandle InHandle) const

Parameters

Name Type Description Default
InHandle FTimerHandle Handle to the timer to query.

Return Type

bool

Example

Toggle pause state C++
void AMyActor::ToggleAbilityCooldown()
{
    FTimerManager& TM = GetWorld()->GetTimerManager();
    if (TM.IsTimerPaused(CooldownHandle))
    {
        TM.UnPauseTimer(CooldownHandle);
    }
    else
    {
        TM.PauseTimer(CooldownHandle);
    }
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.