UKismetAnimationLibrary::K2_EndProfilingTimer
#include "KismetAnimationLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Ends the profiling bracket started by K2_StartProfilingTimer and returns the elapsed time in milliseconds, optionally logging it to the Output Log.
Caveats & Gotchas
- • Calling this without a matching K2_StartProfilingTimer call first produces a meaningless or garbage elapsed time since there is no internal 'not started' check.
- • Logging every frame (bLog = true) in a Tick-driven anim graph will flood the Output Log; reserve logging for one-shot debugging sessions.
Signature
static float K2_EndProfilingTimer(bool bLog = true, const FString& LogPrefix = "") Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bLog | bool | If true, the elapsed time is printed to the Output Log. | true |
| LogPrefix | const FString& | Text prepended to the logged line, useful for identifying which bracket produced the result. | "" |
Return Type
float Example
Read and log elapsed time C++
UKismetAnimationLibrary::K2_StartProfilingTimer();
DoExpensiveAnimWork();
float ElapsedMs = UKismetAnimationLibrary::K2_EndProfilingTimer(true, TEXT("IK solve: ")); Tags
Version History
Introduced in: 4.20
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?