Does your game use GetSeconds()? Does your game have weird, intermittent problems? There might be a direct correlation.
FTimespan::GetSeconds() can cause sneaky, intermittent bugs. It is also exposed to Blueprint in the “Math|Timespan” category with the description “Get Seconds”.
The body of this innocuously named function (in 5.3.somethingOrOther), from Timespan.h:
int32 GetSeconds() const
{
return (int32)((Ticks / ETimespan::TicksPerSecond) % 60);
}
This function gets the number of seconds as would be displayed on a digital clock, not the total number of seconds (which is what the aptly named GetTotalSeconds() is for).
There are quite a few usages of this function throughout Epics own code, and four of them (in my version, yada yada) are deeply suspect, and have probably caused people some serious headaches trying to track their odd behavior down):
\Engine\Plugins\Messaging\UdpMessaging\Source\UdpMessaging\Private\Transport\UdpMessageTransport.cpp:80
if ((CurrentTime - DenyCandidate.LastFailTime).GetSeconds() < CVarBadEndpointPeriod.GetValueOnAnyThread())
\Engine\Plugins\Runtime\HairStrands\Source\HairStrandsCore\Private\GroomBuilder.cpp:1350
const double RemainingTimeInSeconds = RemainingTasks * double(ElaspedTime.GetSeconds() / SlowTask.CompletedWork);
\Engine\Plugins\Runtime\HairStrands\Source\HairStrandsCore\Private\HairCardsBuilder.cpp:1523
const double RemainingTimeInSeconds = RemainingTasks * double(ElaspedTime.GetSeconds() / SlowTask.CompletedWork);
\Engine\Source\Runtime\Networking\Public\Common\TcpListener.h:206
FPlatformProcess::Sleep(SleepTime.GetSeconds());
Note that I also evaluated the usages of GetMinutes and GetHours, but nothing jumped out at me. GetDays just returns the total days, no such problems there.
Given the problems it can (and has) caused, I recommend marking GetSeconds, GetMinutes, and GetHours as deprecated, and introducing GetClockSeconds, GetClockMinutes, and GetClockHours.
This deprecation will help others find the usages in their own code that may be causing problems and fix them.