UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe > Class Template Reference

#include <ProcessTimer.h>

Public Member Functions

 TProcessTimer ()
 
double GetSeconds ()
 
void Start ()
 
void Stop ()
 
void SetPause (bool bPause)
 
void Reset ()
 

Detailed Description

template<typename FCyclesProvider, bool bThreadSafe = true>
class BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe >

Class for wrapping timing functionality with pause feature. The class is thread safe. We template the dependency for cycles so that the class can be nicely tested. Under normal circumstances, use FProcessTimer, which is a typedef below.

Constructor & Destructor Documentation

◆ TProcessTimer()

template<typename FCyclesProvider , bool bThreadSafe = true>
BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe >::TProcessTimer ( )
inline

Default constructor zeros members.

Member Function Documentation

◆ GetSeconds()

template<typename FCyclesProvider , bool bThreadSafe = true>
double BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe >::GetSeconds ( )
inline

Gets the currently accumulated time in seconds, accounting for any time paused.

Returns
the seconds currently accumulated by the timer.

◆ Reset()

template<typename FCyclesProvider , bool bThreadSafe = true>
void BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe >::Reset ( )
inline

◆ SetPause()

template<typename FCyclesProvider , bool bThreadSafe = true>
void BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe >::SetPause ( bool  bPause)
inline

Set whether the process being timed is paused. Automatically adjusts timer results for paused durations.

Parameters
bPauseWhether the process is currently paused.

◆ Start()

template<typename FCyclesProvider , bool bThreadSafe = true>
void BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe >::Start ( )
inline

Start timing. Repeated calls before a Stop() are ignored.

◆ Stop()

template<typename FCyclesProvider , bool bThreadSafe = true>
void BuildPatchServices::TProcessTimer< FCyclesProvider, bThreadSafe >::Stop ( )
inline

Stop timing and accumulate the recording. Repeated calls before a Start() are ignored.


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