RealDocs

UKismetMathLibrary::TimespanMinValue

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

Description

Returns the minimum (most negative) representable FTimespan, approximately -10,675,199 days. Represents the largest possible negative duration.

Caveats & Gotchas

  • FTimespan is signed — the minimum value is a large negative duration, not zero. This is a common source of confusion when using it as a sentinel for 'not started' states.
  • Subtracting any positive value from the min timespan will overflow. Always clamp before arithmetic if values near the boundary are possible.

Signature

static UE_INL_API FTimespan TimespanMinValue( );

Return Type

FTimespan

Example

Use as a sentinel for unset duration C++
FTimespan LastDuration = UKismetMathLibrary::TimespanMinValue(); // sentinel: not yet measured
// Later:
if (LastDuration == UKismetMathLibrary::TimespanMinValue())
{
    UE_LOG(LogTemp, Log, TEXT("No measurement taken yet."));
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.