UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FDurationAtomicTimer Class Reference

#include <ScopedTimers.h>

+ Inheritance diagram for FDurationAtomicTimer:

Public Member Functions

 FDurationAtomicTimer (std::atomic< double > &AccumulatorIn, std::memory_order InMemoryOrder=std::memory_order_relaxed)
 
double Start ()
 
double Stop ()
 

Protected Attributes

double StartTime
 
std::atomic< double > & Accumulator
 
std::memory_order MemoryOrder
 

Detailed Description

Utility stopwatch class for tracking the duration of some action (tracks time in seconds and adds it to the specified variable on destruction), when the storage is std::atomic<double>.

Constructor & Destructor Documentation

◆ FDurationAtomicTimer()

FDurationAtomicTimer::FDurationAtomicTimer ( std::atomic< double > &  AccumulatorIn,
std::memory_order  InMemoryOrder = std::memory_order_relaxed 
)
inlineexplicit

Member Function Documentation

◆ Start()

double FDurationAtomicTimer::Start ( )
inline

◆ Stop()

double FDurationAtomicTimer::Stop ( )
inline

Member Data Documentation

◆ Accumulator

std::atomic<double>& FDurationAtomicTimer::Accumulator
protected

Time variable to update.

◆ MemoryOrder

std::memory_order FDurationAtomicTimer::MemoryOrder
protected

Memory order specified in constructor and passed to fetch_add.

◆ StartTime

double FDurationAtomicTimer::StartTime
protected

Start time, captured in ctor.


The documentation for this class was generated from the following file: