Reece Wilson
7be2d3fbdc
[+] AuNet::ISocketStats [+] AuNet::ISocketChannel::GetRecvStats() [+] AuNet::ISocketChannel::GetSendStats() [+] AuIO::IOProcessor::RunTickEx(AuUInt32 dwTimeout) [*] Refactor clock APIs [+] Documentation in headers [+] AuIO::IIOPipeWork::GetStartTickMS() [+] AuIO::IIOPipeWork::GetLastTickMS() [+] AuIO::IIOPipeWork::GetPredictedThroughput() [+] AuIO::IIOPipeWork::GetBytesProcessed()
59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: ConsoleMessage.hpp
|
|
Date: 2021-6-10
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Threading::Threads
|
|
{
|
|
AUKN_SYM AuThreadId_t GetThreadId();
|
|
}
|
|
|
|
namespace Aurora::Time
|
|
{
|
|
AUKN_SYM AuInt64 CurrentClockMS();
|
|
}
|
|
|
|
namespace Aurora::Console
|
|
{
|
|
struct ConsoleMessage
|
|
{
|
|
EAnsiColor color;
|
|
AuString prefix;
|
|
AuString line;
|
|
AuInt64 time;
|
|
AuThreadId_t tid;
|
|
|
|
inline ConsoleMessage()
|
|
{
|
|
color = EAnsiColor::eReset;
|
|
tid = 0;
|
|
time = 0;
|
|
}
|
|
|
|
inline ConsoleMessage(const AuString &prefix, const AuString &line) : prefix(prefix), line(line), color(EAnsiColor::eReset)
|
|
{
|
|
time = Time::CurrentClockMS();
|
|
tid = Threading::Threads::GetThreadId();
|
|
}
|
|
|
|
inline ConsoleMessage(const EAnsiColor color, const AuString &prefix, const AuString &line) : prefix(prefix), line(line), color(color)
|
|
{
|
|
time = Time::CurrentClockMS();
|
|
tid = Threading::Threads::GetThreadId();
|
|
}
|
|
|
|
AUKN_SYM void Read(Memory::ByteBuffer &deserialize);
|
|
AUKN_SYM void Write(Memory::ByteBuffer &serialize) const;
|
|
|
|
AUKN_SYM AuString StringifyTime(bool bSimple = false) const;
|
|
AUKN_SYM AuString StringifyTimeUTC() const;
|
|
AUKN_SYM AuString GetWrappedTag() const;
|
|
AUKN_SYM AuString ToConsole() const;
|
|
AUKN_SYM AuString ToPersistentString() const;
|
|
AUKN_SYM AuString ToSimplified() const;
|
|
};
|
|
} |