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

#include <ScopedTimers.h>

+ Inheritance diagram for FScopedSwitchedDurationTimer:

Public Member Functions

 FScopedSwitchedDurationTimer (double &AccumulatorIn, bool bDoFunctionalityIn)
 
 ~FScopedSwitchedDurationTimer ()
 
double Start ()
 

Protected Attributes

double StartTime
 
doubleAccumulator
 
const bool bDoFunctionality
 

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). useful for timing that only wants to occur when a feature is optionally turned on

Constructor & Destructor Documentation

◆ FScopedSwitchedDurationTimer()

FScopedSwitchedDurationTimer::FScopedSwitchedDurationTimer ( double AccumulatorIn,
bool  bDoFunctionalityIn 
)
inlineexplicit

◆ ~FScopedSwitchedDurationTimer()

FScopedSwitchedDurationTimer::~FScopedSwitchedDurationTimer ( )
inline

Member Function Documentation

◆ Start()

double FScopedSwitchedDurationTimer::Start ( )
inline

Member Data Documentation

◆ Accumulator

double& FScopedSwitchedDurationTimer::Accumulator
protected

Time variable to update.

◆ bDoFunctionality

const bool FScopedSwitchedDurationTimer::bDoFunctionality
protected

◆ StartTime

double FScopedSwitchedDurationTimer::StartTime
protected

Start time, captured in ctor.


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