25 std::memory_order MemoryOrder = std::memory_order_seq_cst);
96 return AccumulatorValue;
100 double AccumulatorValue;
168template <
typename ThreadSafeCounterClass>
200 , Timer (Accumulator)
208 Device->
Logf(
TEXT(
"%s: %f secs"), *Msg, Accumulator);
289 LogFunc(*FString::Printf(
TEXT(
"%s started..."),
InTitle));
295 TotalTime += LocalTime;
300 if (TotalTime > LocalTime)
317 std::memory_order MemoryOrder)
319 double Expected =
Value.load(std::memory_order_relaxed);
322 MemoryOrder == std::memory_order_relaxed ? std::memory_order_relaxed
323 : MemoryOrder == std::memory_order_acq_rel ? std::memory_order_acq_rel
324 : std::memory_order_seq_cst;
332 std::memory_order_relaxed);
339#define UE_SCOPED_TIMER(Title, Category, Verbosity)
341#define UE_SCOPED_TIMER(Title, Category, Verbosity) \
342 static double UE_SCOPED_TIMER_COMBINE(ScopedTimerTotal_,__LINE__) = 0.0; FScopedDurationTimeCustomLogger UE_SCOPED_TIMER_COMBINE(ScopedTimer_,__LINE__)(Title, UE_SCOPED_TIMER_COMBINE(ScopedTimerTotal_,__LINE__), [](const TCHAR* Msg) { UE_LOG(Category, Verbosity, TEXT("%s"), Msg) })
344#define UE_SCOPED_TIMER_COMBINE_INNER(A,B) A##B
345#define UE_SCOPED_TIMER_COMBINE(A,B) UE_SCOPED_TIMER_COMBINE_INNER(A,B)
#define GLog
Definition CoreGlobals.h:95
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
TScopedDurationThreadSafeTimer< FThreadSafeCounter64 > FScopedDurationThreadSafeTimer64
Definition ScopedTimers.h:187
double AtomicDoubleFetchAdd(std::atomic< double > &Value, double Delta, std::memory_order MemoryOrder=std::memory_order_seq_cst)
Definition ScopedTimers.h:316
TScopedDurationThreadSafeTimer< FThreadSafeCounter > FScopedDurationThreadSafeTimer
Definition ScopedTimers.h:186
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition ScopedTimers.h:85
double GetTime()
Definition ScopedTimers.h:93
FAutoScopedDurationTimer()
Definition ScopedTimers.h:87
Definition ScopedTimers.h:109
double Stop()
Definition ScopedTimers.h:124
double StartTime
Definition ScopedTimers.h:135
std::memory_order MemoryOrder
Definition ScopedTimers.h:139
std::atomic< double > & Accumulator
Definition ScopedTimers.h:137
double Start()
Definition ScopedTimers.h:118
FDurationAtomicTimer(std::atomic< double > &AccumulatorIn, std::memory_order InMemoryOrder=std::memory_order_relaxed)
Definition ScopedTimers.h:111
Definition ScopedTimers.h:32
double StartTime
Definition ScopedTimers.h:56
double & Accumulator
Definition ScopedTimers.h:58
double Stop()
Definition ScopedTimers.h:45
FDurationTimer(double &AccumulatorIn)
Definition ScopedTimers.h:34
double Start()
Definition ScopedTimers.h:39
Definition OutputDevice.h:133
void Logf(const FmtType &Fmt)
Definition OutputDevice.h:234
Definition ScopedTimers.h:147
FScopedDurationAtomicTimer(std::atomic< double > &AccumulatorIn, std::memory_order InMemoryOrder=std::memory_order_relaxed)
Definition ScopedTimers.h:149
~FScopedDurationAtomicTimer()
Definition ScopedTimers.h:156
Definition ScopedTimers.h:281
~FScopedDurationTimeCustomLogger()
Definition ScopedTimers.h:292
FScopedDurationTimeCustomLogger(const TCHAR *InTitle, double &InTotalTime, Func InLogFunc)
Definition ScopedTimers.h:283
Definition ScopedTimers.h:194
FScopedDurationTimeLogger(FString InMsg=TEXT("Scoped action"), FOutputDevice *InDevice=GLog)
Definition ScopedTimers.h:196
~FScopedDurationTimeLogger()
Definition ScopedTimers.h:205
Definition ScopedTimers.h:66
~FScopedDurationTimer()
Definition ScopedTimers.h:74
FScopedDurationTimer(double &AccumulatorIn)
Definition ScopedTimers.h:68
Definition ScopedTimers.h:262
FScopedSwitchedCountedDurationTimer(double &TimeAccumulatorIn, int32 &CountAccumlatorIn, bool bDoFunctionalityIn)
Definition ScopedTimers.h:264
Definition ScopedTimers.h:224
~FScopedSwitchedDurationTimer()
Definition ScopedTimers.h:233
const bool bDoFunctionality
Definition ScopedTimers.h:252
FScopedSwitchedDurationTimer(double &AccumulatorIn, bool bDoFunctionalityIn)
Definition ScopedTimers.h:226
double & Accumulator
Definition ScopedTimers.h:251
double StartTime
Definition ScopedTimers.h:249
double Start()
Definition ScopedTimers.h:241
Definition ScopedTimers.h:170
~TScopedDurationThreadSafeTimer()
Definition ScopedTimers.h:177
TScopedDurationThreadSafeTimer(ThreadSafeCounterClass &InCounter)
Definition ScopedTimers.h:172
BuilderType & Appendf(const FmtType &Fmt, Types... Args)
Definition StringBuilder.h:419
Definition StringBuilder.h:509
Definition AndroidPlatformTime.h:18
static uint32 Cycles()
Definition AndroidPlatformTime.h:27
static double Seconds()
Definition AndroidPlatformTime.h:20