mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-25 23:40:51 +08:00
Merge pull request #188 from limingchina/rename_version_functions
rename function names related to versions
This commit is contained in:
commit
5e85aea867
@ -464,7 +464,7 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API timestamp_t now();
|
||||
PROFILER_API timestamp_t timeNow();
|
||||
|
||||
/** Convert ticks to nanoseconds.
|
||||
|
||||
@ -670,19 +670,19 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint8_t versionMajor();
|
||||
PROFILER_API uint8_t apiVersionMajor();
|
||||
|
||||
/** Returns current minor version.
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint8_t versionMinor();
|
||||
PROFILER_API uint8_t apiVersionMinor();
|
||||
|
||||
/** Returns current version patch.
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint16_t versionPatch();
|
||||
PROFILER_API uint16_t apiVersionPatch();
|
||||
|
||||
/** Returns current version in 32-bit integer format.
|
||||
|
||||
@ -691,7 +691,7 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API uint32_t version();
|
||||
PROFILER_API uint32_t apiVersion();
|
||||
|
||||
/** Returns current version string.
|
||||
|
||||
@ -699,7 +699,7 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
PROFILER_API const char* versionName();
|
||||
PROFILER_API const char* apiVersionName();
|
||||
|
||||
/** Returns true if current thread has been marked as Main.
|
||||
Otherwise, returns false.
|
||||
@ -766,7 +766,7 @@ namespace profiler {
|
||||
|
||||
}
|
||||
#else
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t now() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t timeNow() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t toNanoseconds(timestamp_t) { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t toMicroseconds(timestamp_t) { return 0; }
|
||||
inline const BaseBlockDescriptor* registerDescription(EasyBlockStatus, const char*, const char*, const char*, int, block_type_t, color_t, bool = false)
|
||||
@ -790,11 +790,11 @@ namespace profiler {
|
||||
inline void startListen(uint16_t = ::profiler::DEFAULT_PORT) { }
|
||||
inline void stopListen() { }
|
||||
inline EASY_CONSTEXPR_FCN bool isListening() { return false; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t versionMajor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t versionMinor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint16_t versionPatch() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint32_t version() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN const char* versionName() { return "v0.0.0_disabled"; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t apiVersionMajor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint8_t apiVersionMinor() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint16_t apiVersionPatch() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN uint32_t apiVersion() { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN const char* apiVersionName() { return "v0.0.0_disabled"; }
|
||||
inline EASY_CONSTEXPR_FCN bool isMainThread() { return false; }
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t this_thread_frameTime(Duration = ::profiler::MICROSECONDS) { return 0; }
|
||||
inline EASY_CONSTEXPR_FCN timestamp_t this_thread_frameTimeLocalMax(Duration = ::profiler::MICROSECONDS) { return 0; }
|
||||
@ -898,7 +898,7 @@ namespace profiler {
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
EASY_FORCE_INLINE timestamp_t currentTime() { return now(); }
|
||||
EASY_FORCE_INLINE timestamp_t currentTime() { return timeNow(); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -85,7 +85,7 @@ extern const uint32_t EASY_PROFILER_VERSION = (static_cast<uint32_t>(EASY_PROFIL
|
||||
|
||||
extern "C" {
|
||||
|
||||
PROFILER_API uint8_t versionMajor()
|
||||
PROFILER_API uint8_t apiVersionMajor()
|
||||
{
|
||||
static_assert(0 <= EASY_PROFILER_VERSION_MAJOR && EASY_PROFILER_VERSION_MAJOR <= 255,
|
||||
"EASY_PROFILER_VERSION_MAJOR must be defined in range [0, 255]");
|
||||
@ -93,7 +93,7 @@ PROFILER_API uint8_t versionMajor()
|
||||
return EASY_PROFILER_VERSION_MAJOR;
|
||||
}
|
||||
|
||||
PROFILER_API uint8_t versionMinor()
|
||||
PROFILER_API uint8_t apiVersionMinor()
|
||||
{
|
||||
static_assert(0 <= EASY_PROFILER_VERSION_MINOR && EASY_PROFILER_VERSION_MINOR <= 255,
|
||||
"EASY_PROFILER_VERSION_MINOR must be defined in range [0, 255]");
|
||||
@ -101,7 +101,7 @@ PROFILER_API uint8_t versionMinor()
|
||||
return EASY_PROFILER_VERSION_MINOR;
|
||||
}
|
||||
|
||||
PROFILER_API uint16_t versionPatch()
|
||||
PROFILER_API uint16_t apiVersionPatch()
|
||||
{
|
||||
static_assert(0 <= EASY_PROFILER_VERSION_PATCH && EASY_PROFILER_VERSION_PATCH <= 65535,
|
||||
"EASY_PROFILER_VERSION_PATCH must be defined in range [0, 65535]");
|
||||
@ -109,12 +109,12 @@ PROFILER_API uint16_t versionPatch()
|
||||
return EASY_PROFILER_VERSION_PATCH;
|
||||
}
|
||||
|
||||
PROFILER_API uint32_t version()
|
||||
PROFILER_API uint32_t apiVersion()
|
||||
{
|
||||
return EASY_PROFILER_VERSION;
|
||||
}
|
||||
|
||||
PROFILER_API const char* versionName()
|
||||
PROFILER_API const char* apiVersionName()
|
||||
{
|
||||
#ifdef EASY_PROFILER_API_DISABLED
|
||||
return EASY_PROFILER_PRODUCT_VERSION "_disabled";
|
||||
@ -127,7 +127,7 @@ PROFILER_API const char* versionName()
|
||||
|
||||
#if !defined(EASY_PROFILER_API_DISABLED)
|
||||
|
||||
PROFILER_API profiler::timestamp_t now()
|
||||
PROFILER_API profiler::timestamp_t timeNow()
|
||||
{
|
||||
return profiler::clock::now();
|
||||
}
|
||||
@ -295,7 +295,7 @@ PROFILER_API profiler::timestamp_t main_thread_frameTimeLocalAvg(profiler::Durat
|
||||
|
||||
#else // EASY_PROFILER_API_DISABLED
|
||||
|
||||
PROFILER_API profiler::timestamp_t now() { return 0; }
|
||||
PROFILER_API profiler::timestamp_t timeNow() { return 0; }
|
||||
PROFILER_API profiler::timestamp_t toNanoseconds(profiler::timestamp_t) { return 0; }
|
||||
PROFILER_API profiler::timestamp_t toMicroseconds(profiler::timestamp_t) { return 0; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user