本文整理汇总了C++中FDateTime类的典型用法代码示例。如果您正苦于以下问题:C++ FDateTime类的具体用法?C++ FDateTime怎么用?C++ FDateTime使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FDateTime类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetLocalTimezone
FString FDateTimeStructCustomization::ToDateTimeZoneString(const FDateTime& UTCDate)
{
const int32 DisplayTimezone = GetLocalTimezone();
const FDateTime LocalTime = ConvertTime(UTCDate, TIMEZONE_UTC, DisplayTimezone);
return FString::Printf(TEXT("%s %s%0.4d"), *LocalTime.ToString(), (DisplayTimezone >= 0 ? TEXT("+") : TEXT("")), DisplayTimezone);
}
示例2: StartQosPass
void FQosDatacenterStats::StartQosPass()
{
if (!bAnalyticsInProgress)
{
FDateTime UTCTime = FDateTime::UtcNow();
QosData.Timestamp = UTCTime.ToString();
StartTimer(QosData.SearchTime);
bAnalyticsInProgress = true;
}
}
示例3: SafeSetTimeStamp
bool FBuildDataCompactifier::SafeSetTimeStamp(const FString& FilePath, FDateTime TimeStamp) const
{
bool bSuccess = false;
IFileManager& FileMan = IFileManager::Get();
bSuccess = FileMan.SetTimeStamp(*FilePath, TimeStamp);
if (bSuccess)
{
FDateTime ActualTimeStamp = FileMan.GetTimeStamp(*FilePath);
int64 TickVariance = FMath::Abs(ActualTimeStamp.GetTicks() - TimeStamp.GetTicks());
bSuccess = TickVariance < BuildDataCompactifierDefs::TimeStampTolerance;
}
return bSuccess;
}
示例4: CaptureEditorData
void CaptureEditorData(EditorPerfCaptureParameters& OutEditorPerfStats)
{
//Capture the current time stamp and format it to YYYY-MM-DD HH:MM:SS.mmm.
FDateTime CurrentDateAndTime = FDateTime::UtcNow();
//Find the Average FPS
//Clamp to avoid huge averages at startup or after hitches
const float CurrentFPS = 1.0f / FSlateApplication::Get().GetAverageDeltaTime();
const float ClampedFPS = (CurrentFPS < 0.0f || CurrentFPS > 4000.0f) ? 0.0f : CurrentFPS;
OutEditorPerfStats.AverageFPS.Add(ClampedFPS);
//Find the Frame Time in ms.
//Clamp to avoid huge averages at startup or after hitches
const float AverageMS = FSlateApplication::Get().GetAverageDeltaTime() * 1000.0f;
const float ClampedMS = (AverageMS < 0.0f || AverageMS > 4000.0f) ? 0.0f : AverageMS;
OutEditorPerfStats.AverageFrameTime.Add(ClampedMS);
//Query OS for process memory used.
FPlatformMemoryStats MemoryStats = FPlatformMemory::GetStats();
OutEditorPerfStats.UsedPhysical.Add((float)MemoryStats.UsedPhysical / 1024);
//Query OS for available physical memory
OutEditorPerfStats.AvailablePhysical.Add((float)MemoryStats.AvailablePhysical / 1024);
//Query OS for available virtual memory
OutEditorPerfStats.AvailableVirtual.Add((float)MemoryStats.AvailableVirtual / 1024);
//Query OS for used virtual memory
OutEditorPerfStats.UsedVirtual.Add((float)MemoryStats.UsedVirtual / 1024);
//Query OS for used Peak Used physical memory
OutEditorPerfStats.PeakUsedPhysical.Add((float)MemoryStats.PeakUsedPhysical / 1024);
//Query OS for used Peak Used virtual memory
OutEditorPerfStats.PeakUsedVirtual.Add((float)MemoryStats.PeakUsedVirtual / 1024);
//Capture the time stamp.
FString FormatedTimeStamp = FString::Printf(TEXT("%04i-%02i-%02i %02i:%02i:%02i.%03i"), CurrentDateAndTime.GetYear(), CurrentDateAndTime.GetMonth(), CurrentDateAndTime.GetDay(), CurrentDateAndTime.GetHour(), CurrentDateAndTime.GetMinute(), CurrentDateAndTime.GetSecond(), CurrentDateAndTime.GetMillisecond());
OutEditorPerfStats.FormattedTimeStamp.Add(FormatedTimeStamp);
OutEditorPerfStats.TimeStamp.Add(CurrentDateAndTime);
}
示例5: ConvertToTimeDate
FTimeDate ATimeManager::ConvertToTimeDate(FDateTime dt)
{
return FTimeDate(dt.GetYear(), dt.GetMonth(), dt.GetDay(), dt.GetHour(), dt.GetMinute(), dt.GetSecond(), dt.GetMillisecond());
}
示例6: IsMorning
bool UKismetMathLibrary::IsMorning( FDateTime A )
{
return A.IsMorning();
}
示例7: IsAfternoon
bool UKismetMathLibrary::IsAfternoon( FDateTime A )
{
return A.IsAfternoon();
}
示例8: GetYear
int32 UKismetMathLibrary::GetYear( FDateTime A )
{
return A.GetYear();
}
示例9: GetTimeOfDay
FTimespan UKismetMathLibrary::GetTimeOfDay( FDateTime A )
{
return A.GetTimeOfDay();
}
示例10: GetSecond
int32 UKismetMathLibrary::GetSecond( FDateTime A )
{
return A.GetSecond();
}
示例11: TimestampToString
static FString TimestampToString(FDateTime InTimestamp)
{
return LexicalConversion::ToString(InTimestamp.ToUnixTimestamp());
}
示例12: GetMinute
int32 UKismetMathLibrary::GetMinute( FDateTime A )
{
return A.GetMinute();
}
示例13:
int32 UKismetMathLibrary::GetHour12( FDateTime A )
{
return A.GetHour12();
}
示例14: GetDay
int32 UKismetMathLibrary::GetDay( FDateTime A )
{
return A.GetDay();
}
示例15: GetDate
FDateTime UKismetMathLibrary::GetDate( FDateTime A )
{
return A.GetDate();
}