当前位置: 首页>>代码示例>>C++>>正文


C++ FDateTime::GetYear方法代码示例

本文整理汇总了C++中FDateTime::GetYear方法的典型用法代码示例。如果您正苦于以下问题:C++ FDateTime::GetYear方法的具体用法?C++ FDateTime::GetYear怎么用?C++ FDateTime::GetYear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FDateTime的用法示例。


在下文中一共展示了FDateTime::GetYear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetYear

int32 UKismetMathLibrary::GetYear( FDateTime A )
{
	return A.GetYear();
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:4,代码来源:KismetMathLibrary.cpp

示例2: ConvertToTimeDate

FTimeDate ATimeManager::ConvertToTimeDate(FDateTime dt)
{
    return FTimeDate(dt.GetYear(), dt.GetMonth(), dt.GetDay(), dt.GetHour(), dt.GetMinute(), dt.GetSecond(), dt.GetMillisecond());
}
开发者ID:midgen,项目名称:cashgenUE,代码行数:4,代码来源:TimeManager.cpp

示例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);

}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:42,代码来源:EditorPerformanceTests.cpp


注:本文中的FDateTime::GetYear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。