UKismetMathLibrary::GetTotalMinutes
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the total elapsed time of the timespan as a fractional number of minutes, rolling up all days, hours, seconds, and sub-second components into a single value.
Caveats & Gotchas
- • Returns the *total* span in minutes, not the minutes component. A timespan of 1 hour and 30 minutes returns 90.0. Use FTimespan::GetMinutes() if you want the minutes component only.
- • Comparing two timespans by their GetTotalMinutes values is equivalent to comparing the spans directly, but introduces floating-point conversion — prefer direct FTimespan comparison operators when testing equality.
Signature
static UE_INL_API double GetTotalMinutes( FTimespan A ); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FTimespan | The timespan to query. | — |
Return Type
double Example
Cooldown progress expressed in minutes C++
FTimespan Remaining = CooldownEnd - FDateTime::UtcNow();
double MinutesLeft = UKismetMathLibrary::GetTotalMinutes(Remaining);
UE_LOG(LogTemp, Log, TEXT("Cooldown: %.1f minutes remaining"), MinutesLeft); See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?