RealDocs

UKismetMathLibrary::NotEqual_TimespanTimespan

function Engine Blueprint Since 4.7
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns true if A and B do not represent exactly the same duration. This is the logical inverse of EqualEqual_TimespanTimespan.

Caveats & Gotchas

  • Like EqualEqual_TimespanTimespan, comparison is exact — floating-point rounding when constructing timespans from seconds can cause unexpected inequality.
  • In C++ prefer the != operator on FTimespan directly; this wrapper exists for Blueprint inequality nodes.

Signature

static UE_INL_API bool NotEqual_TimespanTimespan( FTimespan A, FTimespan B );

Parameters

Name Type Description Default
A FTimespan Left-hand timespan.
B FTimespan Right-hand timespan.

Return Type

bool

Example

Guard against redundant timer reset C++
FTimespan NewDuration = FTimespan::FromSeconds(10.0);
if (UKismetMathLibrary::NotEqual_TimespanTimespan(CurrentDuration, NewDuration))
{
    CurrentDuration = NewDuration;
    ResetTimer();
}

Version History

Introduced in: 4.7

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.