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


C++ FTimespan::GetSeconds方法代码示例

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


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

示例1: BreakTimespan

void UKismetMathLibrary::BreakTimespan(FTimespan InTimespan, int32& Days, int32& Hours, int32& Minutes, int32& Seconds, int32& Milliseconds)
{
	Days = InTimespan.GetDays();
	Hours = InTimespan.GetHours();
	Minutes = InTimespan.GetMinutes();
	Seconds = InTimespan.GetSeconds();
	Milliseconds = InTimespan.GetMilliseconds();
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:8,代码来源:KismetMathLibrary.cpp

示例2: GetSeconds

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

示例3: SendPayloadAndReceiveResponse

bool FHTTPTransport::SendPayloadAndReceiveResponse(TArray<uint8>& In, TArray<uint8>& Out)
{
	RecieveBuffer.Empty();
	ReadPtr = 0; 

#if !PLATFORM_HTML5
	
	if (GIsRequestingExit) // We have already lost HTTP Module. 
		return false; 

	class HTTPRequestHandler
	{

	public:
		HTTPRequestHandler(TArray<uint8>& InOut)
			:Out(InOut)
		{} 
		void HttpRequestComplete(	FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, bool bSucceeded)
		{
			if (HttpResponse.IsValid())
				Out.Append(HttpResponse->GetContent());
		}
	private: 
		TArray<uint8>& Out; 
	};

	HTTPRequestHandler Handler(RecieveBuffer);

	HttpRequest->OnProcessRequestComplete().BindRaw(&Handler,&HTTPRequestHandler::HttpRequestComplete );
	if ( In.Num() )
	{
		HttpRequest->SetVerb("POST");

		FBufferArchive Ar; 
		Ar << Guid; 
		Ar.Append(In); 

		HttpRequest->SetContent(Ar);
	}
	else
	{
		HttpRequest->SetVerb("GET");
	}

	HttpRequest->ProcessRequest();

	FDateTime StartTime; 
	FTimespan Span = FDateTime::UtcNow() - StartTime; 

	while( HttpRequest->GetStatus() != EHttpRequestStatus::Failed && HttpRequest->GetStatus() != EHttpRequestStatus::Succeeded &&  Span.GetSeconds() < 10 )
	{
		HttpRequest->Tick(0);
		Span = FDateTime::UtcNow() - StartTime; 
	}


	if (HttpRequest->GetStatus() == EHttpRequestStatus::Succeeded)
		return true; 

	HttpRequest->CancelRequest();

	return false; 
#else  // PLATFORM_HTML5

	FBufferArchive Ar; 
	if ( In.Num() )
	{
		Ar << Guid; 
	}

	Ar.Append(In); 
	unsigned char *OutData = NULL; 
	unsigned int OutSize= 0; 

	bool RetVal = true; 

#if PLATFORM_HTML5_WIN32
	RetVal = HTML5Win32::NFSHttp::SendPayLoadAndRecieve(Ar.GetData(), Ar.Num(), &OutData, OutSize);
#endif 
#if PLATFORM_HTML5_BROWSER
	UE_SendAndRecievePayLoad(TCHAR_TO_ANSI(Url),(char*)Ar.GetData(),Ar.Num(),(char**)&OutData,(int*)&OutSize);
#endif 

	if (!Ar.Num())
	{
		uint32 Size = OutSize;
		uint32 Marker = 0xDeadBeef; 
		RecieveBuffer.Append((uint8*)&Marker,sizeof(uint32));
		RecieveBuffer.Append((uint8*)&Size,sizeof(uint32));
	}


	if (OutSize)
	{
		RecieveBuffer.Append(OutData,OutSize); 

#if PLATFORM_HTML5_WIN32
		free (OutData); 
#endif 
#if PLATFORM_HTML5_BROWSER
//.........这里部分代码省略.........
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:101,代码来源:HTTPTransport.cpp


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