FScopedSwitchedCountedDurationTimer

Utility stopwatch class for tracking the duration of some action (tracks time in seconds and adds it to the specified variable on destruction).

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FScopedSwitchedDurationTimer

FScopedSwitchedCountedDurationTimer

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/ProfilingDebugging/ScopedTimers.h

Include

#include "ProfilingDebugging/ScopedTimers.h"

Syntax

class FScopedSwitchedCountedDurationTimer : private FScopedSwitchedDurationTimer

Remarks

Utility stopwatch class for tracking the duration of some action (tracks time in seconds and adds it to the specified variable on destruction). useful for timing that only wants to occur when a feature is optionally turned on Also counts the number of timings

Constructors

Name Description

Public function

FScopedSwitchedCountedDurationTimer

(
    double& TimeAccumulatorIn,
    int32& CountAccumlatorIn,
    bool bDoFunctionalityIn
)