AuroraRuntime/Source/IO/Net/AuSocketStats.hpp
Jamie Reece Wilson 1f685b635b [+] ISocketStats::GetUptimeNS
[*] Some socket stat cleanup+fixes
2023-10-23 09:17:46 +01:00

38 lines
886 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuSocketStats.hpp
Date: 2022-12-06
Author: Reece
***/
#pragma once
#include <Aurora/Utility/ThroughputCalculator.hpp>
namespace Aurora::IO::Net
{
struct SocketStats : ISocketStats
{
void AddBytes(AuUInt32 uBytes);
virtual AuInt64 GetFirstTickTimeMS() override;
virtual AuInt64 GetLastTickTimeMS() override;
virtual AuUInt64 GetTotalBytesTransferred() override;
virtual double GetApproximatedThroughput() override;
virtual AuUInt64 GetUptimeNS() override;
void Start();
void End();
AuUInt64 uLastTimeSteadyMS {};
private:
Aurora::Utility::ThroughputCalculator calculator;
AuUInt64 uFirstTime {};
AuUInt64 uStartSteadyTime {};
AuUInt64 uEndSteadyTime {};
};
}