UKismetMathLibrary::Greater_TimespanTimespan
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns true if A is strictly greater than B. Comparison operates on the int64 tick count, so negative timespans compare correctly.
Caveats & Gotchas
- • Negative timespans compare as less than positive ones — a result of (A - B) when A < B will be less than FTimespan::Zero().
- • In C++ use the > operator on FTimespan directly; this function is the Blueprint-exposed wrapper.
Signature
static UE_INL_API bool Greater_TimespanTimespan( FTimespan A, FTimespan B ); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FTimespan | Left-hand timespan. | — |
| B | FTimespan | Right-hand timespan. | — |
Return Type
bool Example
Check if elapsed time exceeds a threshold C++
FTimespan Threshold = FTimespan::FromSeconds(30.0);
if (UKismetMathLibrary::Greater_TimespanTimespan(ElapsedTime, Threshold))
{
TriggerTimeoutEvent();
} Tags
Version History
Introduced in: 4.7
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?