RealDocs

UKismetMathLibrary::Add_TimespanTimespan

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

Description

Returns A + B as a new FTimespan. In Blueprint this appears as the '+' operator node for Timespan types.

Caveats & Gotchas

  • There is no overflow check — adding two very large timespans can silently wrap the internal int64 tick counter.
  • In C++ you can use the FTimespan + operator directly; this function exists primarily to expose addition to Blueprint.

Signature

static UE_INL_API FTimespan Add_TimespanTimespan( FTimespan A, FTimespan B );

Parameters

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

Return Type

FTimespan

Example

Accumulate multiple durations C++
FTimespan Total = UKismetMathLibrary::Add_TimespanTimespan(
    FTimespan::FromSeconds(30.0),
    FTimespan::FromMinutes(5.0)
);
// Total is now 5 minutes 30 seconds

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.