本文整理汇总了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();
}
示例2: GetSeconds
int32 UKismetMathLibrary::GetSeconds( FTimespan A )
{
return A.GetSeconds();
}
示例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
//.........这里部分代码省略.........