float UKismetMathLibrary::TimespanRatio( FTimespan A, FTimespan B ) { if (B != FTimespan::Zero()) { return (float)A.GetTicks() / (float)B.GetTicks(); } return 0.0; }
FText FText::AsTimespan( const FTimespan& Timespan, const FCulturePtr& TargetCulture) { checkf(FInternationalization::Get().IsInitialized() == true, TEXT("FInternationalization is not initialized. An FText formatting method was likely used in static object initialization - this is not supported.")); FDateTime DateTime(Timespan.GetTicks()); return FText::FromString( DateTime.ToString( TEXT("%H.%M.%S") ) ); }