本文整理汇总了C++中FDateTime::GetHour方法的典型用法代码示例。如果您正苦于以下问题:C++ FDateTime::GetHour方法的具体用法?C++ FDateTime::GetHour怎么用?C++ FDateTime::GetHour使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FDateTime
的用法示例。
在下文中一共展示了FDateTime::GetHour方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetHour
int32 UKismetMathLibrary::GetHour( FDateTime A )
{
return A.GetHour();
}
示例2: ConvertToTimeDate
FTimeDate ATimeManager::ConvertToTimeDate(FDateTime dt)
{
return FTimeDate(dt.GetYear(), dt.GetMonth(), dt.GetDay(), dt.GetHour(), dt.GetMinute(), dt.GetSecond(), dt.GetMillisecond());
}
示例3: 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);
}