Navigation
API > API/Runtime > API/Runtime/Core
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.
| Name | TScopedDurationThreadSafeTimer |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/ProfilingDebugging/ScopedTimers.h |
| Include Path | #include "ProfilingDebugging/ScopedTimers.h" |
Syntax
template<typename ThreadSafeCounterClass>
class TScopedDurationThreadSafeTimer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TScopedDurationThreadSafeTimer
(
ThreadSafeCounterClass& InCounter |
ProfilingDebugging/ScopedTimers.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TScopedDurationThreadSafeTimer() |
ProfilingDebugging/ScopedTimers.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Counter | ThreadSafeCounterClass & | ProfilingDebugging/ScopedTimers.h | ||
| StartCycles | int32 | ProfilingDebugging/ScopedTimers.h |