Removed unused Timer.h

This commit is contained in:
Axel 2021-03-31 10:09:30 +02:00 committed by bernat
parent d7069ee098
commit 5bb9c3ad51
1 changed files with 0 additions and 36 deletions

View File

@ -1,36 +0,0 @@
// Copyright (c) 2021 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#pragma once
#include "Misc/DateTime.h"
struct ScopedTimer
{
ScopedTimer(FString msg)
{
Msg = msg;
StartTime = FDateTime::UtcNow();
StartTimestamp = StartTime.ToUnixTimestamp() * 1000 + StartTime.GetMillisecond();
start = FPlatformTime::Seconds();
}
~ScopedTimer()
{
FDateTime StopTime = FDateTime::UtcNow();
int64 StopTimestamp = StopTime.ToUnixTimestamp() * 1000 + StopTime.GetMillisecond();
double end = FPlatformTime::Seconds();
UE_LOG(LogCarla, Error, TEXT("%s - Timer = %d ms Platform = %f ms"),
*Msg, StopTimestamp-StartTimestamp, (end - start) * 1000.0f);
}
FString Msg;
FDateTime StartTime;
int64 StartTimestamp;
double start;
};