AuroraRuntime/Include/Aurora/Time/StaticClocksDirect.hpp

168 lines
3.5 KiB
C++

/***
Copyright (C) 2021-2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: StaticClocksDirect.hpp
Date: 2021-6-10
Date: 2023-tbd (<6)
Author: Reece
***/
#pragma once
namespace Aurora::Time
{
/**
Retrieves wall clock in milliseconds from the Aurora epoch
*/
AUKN_SYM AuInt64 CurrentClockMS();
/**
Retrieves wall clock in nanoseconds from the Aurora epoch
*/
AUKN_SYM AuInt64 CurrentClockNS();
/**
* @brief Steady clock in jiffies
*/
AUKN_SYM AuUInt64 SteadyClock();
/**
Returns a steady system clock of SteadyClockFrequency() with an undefined epoch.
These values should be used to drive thread primitives, IO time, and tick delta.
On a modern plaform, these shoudln't be affected by the users' calendar or NTP.
On stinkier platforms, who cares if we can run mostly bug free with an assumed-sane wall-clock, right?
*/
AUKN_SYM AuUInt64 SteadyClockMS();
/**
* @brief
*/
AUKN_SYM AuUInt64 SteadyClockNS();
/**
Retrieves the freqency of jiffies per second
*/
AUKN_SYM AuUInt64 SteadyClockFrequency();
/**
* @brief frequency in jiffies per second
*/
AUKN_SYM AuUInt64 ThreadClockFrequency();
/**
* @brief time spent in userspace and in the kernel under this thread [in jiffies]
*/
AUKN_SYM AuUInt64 ThreadClock();
/**
* @brief time spent in userspace and in the kernel under this thread [in nanoseconds]
*/
AUKN_SYM AuUInt64 ThreadClockNS();
/**
* @brief time spent in userspace and in the kernel under this thread [in milliseconds]
*/
AUKN_SYM AuUInt64 ThreadClockMS();
/**
* @brief frequency in jiffies per second
*/
AUKN_SYM AuUInt64 ProcessClockFrequency();
/**
* @brief time spent in userspace and in the kernel under this process [in jiffies]
*/
AUKN_SYM AuUInt64 ProcessClock();
/**
* @brief time spent in userspace and in the kernel under this process [in nanoseconds]
*/
AUKN_SYM AuUInt64 ProcessClockNS();
/**
* @brief time spent in userspace and in the kernel under this process [in milliseconds]
*/
AUKN_SYM AuUInt64 ProcessClockMS();
// Advanced clocks: ////////////////////////
/**
* @brief
*/
AUKN_SYM AuUInt64 ThreadUserClock();
/**
* @brief
*/
AUKN_SYM AuUInt64 ThreadUserClockNS();
/**
* @brief
*/
AUKN_SYM AuUInt64 ThreadUserClockMS();
/**
* @brief frequency
*/
AUKN_SYM AuUInt64 ThreadUserClockFrequency();
/**
* @brief
*/
AUKN_SYM AuUInt64 ProcessUserClock();
/**
* @brief
*/
AUKN_SYM AuUInt64 ProcessUserClockNS();
/**
* @brief
*/
AUKN_SYM AuUInt64 ProcessUserClockMS();
/**
* @brief frequency
*/
AUKN_SYM AuUInt64 ProcessUserClockFrequency();
/**
* @brief
*/
AUKN_SYM AuUInt64 ThreadKernelClock();
/**
* @brief
*/
AUKN_SYM AuUInt64 ThreadKernelClockNS();
/**
* @brief
*/
AUKN_SYM AuUInt64 ThreadKernelClockMS();
/**
* @brief
*/
AUKN_SYM AuUInt64 ThreadKernelClockFrequency();
/**
* @brief
*/
AUKN_SYM AuUInt64 ProcessKernelClock();
/**
* @brief
*/
AUKN_SYM AuUInt64 ProcessKernelClockNS();
/**
* @brief
*/
AUKN_SYM AuUInt64 ProcessKernelClockMS();
/**
* @brief frequency
*/
AUKN_SYM AuUInt64 ProcessKernelClockFrequency();
}