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


C++ FDateTime类代码示例

本文整理汇总了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);

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

示例2: StartQosPass

void FQosDatacenterStats::StartQosPass()
{
	if (!bAnalyticsInProgress)
	{
		FDateTime UTCTime = FDateTime::UtcNow();
		QosData.Timestamp = UTCTime.ToString();

		StartTimer(QosData.SearchTime);
		bAnalyticsInProgress = true;
	}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:11,代码来源:QosStats.cpp

示例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;
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:13,代码来源:BuildPatchCompactifier.cpp

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

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

示例5: 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

示例6: IsMorning

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

示例7: IsAfternoon

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

示例8: GetYear

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

示例9: GetTimeOfDay

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

示例10: GetSecond

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

示例11: TimestampToString

	static FString TimestampToString(FDateTime InTimestamp)
	{
		return LexicalConversion::ToString(InTimestamp.ToUnixTimestamp());
	}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:4,代码来源:EditorAnalytics.cpp

示例12: GetMinute

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

示例13:

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

示例14: GetDay

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

示例15: GetDate

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


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