TScopedDurationThreadSafeTimer

Utility class for tracking the duration of a scoped action to an accumulator in a thread-safe fashion.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

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

Include

#include "ProfilingDebugging/ScopedTimers.h"

Syntax

template<typename ThreadSafeCounterClass>
class TScopedDurationThreadSafeTimer

Remarks

Utility class for tracking the duration of a scoped action to an accumulator in a thread-safe fashion. Can accumulate into a 32bit or 64bit counter.

ThreadSafeCounterClass is expected to be a thread-safe type with a non-static member Add(uint32) that will work correctly if called from multiple threads simultaneously.

Constructors

Name Description

Public function

TScopedDurationThreadSafeTimer

(
    ThreadSafeCounterClass& InCounter
)

Destructors