[+] Added AuXXXX namespace aliases

[*] Clock.hpp readability
[+] Added pseudofunction macros for weak/shared/bind this
This commit is contained in:
Reece Wilson 2021-10-21 11:04:29 +01:00
parent 0ffb19066d
commit 3b2fd7c368
3 changed files with 68 additions and 37 deletions

View File

@ -69,6 +69,27 @@
#include "Time/Time.hpp"
#include "Loop/Loop.hpp"
namespace AuAsync = Aurora::Async;
namespace AuBuild = Aurora::Build;
namespace AuCompression = Aurora::Compression;
namespace AuConsole = Aurora::Console;
namespace AuCrypto = Aurora::Crypto;
namespace AuData = Aurora::Data;
namespace AuDebug = Aurora::Debug;
namespace AuThreading = Aurora::Threading;
namespace AuThreadPrimitives = Aurora::Threading::Primitives;
namespace AuHwInfo = Aurora::HWInfo;
namespace AuIO = Aurora::IO;
namespace AuIOFS = Aurora::IO::FS;
namespace AuIONet = Aurora::IO::Net;
namespace AuLocale = Aurora::Locale;
namespace AuParse = Aurora::Parse;
namespace AuProcess = Aurora::Process;
namespace AuProcesses = Aurora::Processes;
namespace AuTelemetry = Aurora::Telemetry;
namespace AuTime = Aurora::Time;
namespace AuTypes = Aurora::Types;
namespace AuLog = Aurora::Console::Logging;
namespace Aurora
{

View File

@ -9,28 +9,6 @@
namespace Aurora::Time
{
// aurora epoch to time_t
/**
Converts seconds from the Aurora epoch to time_t
@deprecated
*/
AUKN_SYM time_t SToCTime(AuInt64 time);
/**
Converts nanoseconds from the Aurora epoch to time_t
@deprecated
*/
AUKN_SYM time_t NSToCTime(AuInt64 time);
/**
Converts milliseconds from the Aurora epoch to time_t
@deprecated
*/
AUKN_SYM time_t MSToCTime(AuInt64 time);
AUKN_SYM AuInt64 CTimeToMS(time_t time);
/**
Converts milliseconds from the Aurora epoch to a civil timestamp structure
similar to or of std::tm
@ -61,6 +39,27 @@ namespace Aurora::Time
*/
AUKN_SYM AuUInt64 CurrentClockNS();
/**
Translates the Aurora epoch to the standard unix epoch
*/
AUKN_SYM AuInt64 ConvertAuroraToUnixMS(AuInt64 in);
/**
Translates the Aurora epoch to the standard unix epoch
*/
AUKN_SYM AuInt64 ConvertAuroraToUnixNS(AuInt64 in);
/**
Translates a standard unix epoch to the Aurora epoch
*/
AUKN_SYM AuInt64 ConvertUnixToAuroraMS(AuInt64 in);
/**
Translates a standard unix epoch to the Aurora epoch
*/
AUKN_SYM AuInt64 ConvertUnixToAuroraNS(AuInt64 in);
/**
Returns a high resolution count of jiffies with an undefined epoch from a
high resolution clock.
@ -79,25 +78,24 @@ namespace Aurora::Time
AUKN_SYM AuUInt64 ConvertInternalToAuroraEpochNS(AuUInt64 in);
/**
Translates the Aurora epoch to the standard unix epoch
Converts seconds from the Aurora epoch to time_t
@deprecated
*/
AUKN_SYM AuInt64 ConvertAuroraToUnixMS(AuInt64 in);
AUKN_SYM time_t SToCTime(AuInt64 time);
/**
Translates the Aurora epoch to the standard unix epoch
Converts nanoseconds from the Aurora epoch to time_t
@deprecated
*/
AUKN_SYM AuInt64 ConvertAuroraToUnixNS(AuInt64 in);
AUKN_SYM time_t NSToCTime(AuInt64 time);
/**
Translates a standard unix epoch to the Aurora epoch
Converts milliseconds from the Aurora epoch to time_t
@deprecated
*/
AUKN_SYM AuInt64 ConvertUnixToAuroraMS(AuInt64 in);
AUKN_SYM time_t MSToCTime(AuInt64 time);
/**
Translates a standard unix epoch to the Aurora epoch
*/
AUKN_SYM AuInt64 ConvertUnixToAuroraNS(AuInt64 in);
AUKN_SYM AuInt64 CTimeToMS(time_t time);
/**
Retrieves the freqency as a fraction of: jiffies per second / 1 * nanoseconds in a second

View File

@ -115,3 +115,15 @@ name ## Shared_t name ## Shared(T... args) \
#include "AuroraInterfaces.hpp"
#include "AuroraForEach.hpp"
#if !defined(AuBindThis)
#define AuBindThis(method, ...) std::bind(method, this, ## __VA_ARGS__)
#endif
#if !defined(AuSharedFromThis)
#define AuSharedFromThis() AU_SHARED_FROM_THIS
#endif
#if !defined(AuWeakFromThis)
#define AuWeakFromThis() AU_SHARED_FROM_THIS
#endif