From a9a77f86d1aaa800c6a7f76b59c2ad2ecca25436 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 20 Sep 2019 23:51:46 -0700 Subject: [PATCH] ircd: Inline single jump without LTO for now. --- include/ircd/timedate.h | 16 ++++++++++++++++ ircd/timedate.cc | 24 ------------------------ 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/include/ircd/timedate.h b/include/ircd/timedate.h index c9203c993..99f42f9fe 100644 --- a/include/ircd/timedate.h +++ b/include/ircd/timedate.h @@ -152,6 +152,14 @@ ircd::time(time_t &ref) return ref; } +template<> +inline ircd::system_point +__attribute__((always_inline, artificial, flatten)) +ircd::now() +{ + return system_clock::now(); +} + // // steady_clock // @@ -168,3 +176,11 @@ ircd::now() return std::chrono::duration_cast(now); } + +template<> +inline ircd::steady_point +__attribute__((always_inline, artificial, flatten)) +ircd::now() +{ + return steady_clock::now(); +} diff --git a/ircd/timedate.cc b/ircd/timedate.cc index 54e81dd77..30e2b06a0 100644 --- a/ircd/timedate.cc +++ b/ircd/timedate.cc @@ -253,27 +253,3 @@ ircd::microtime() }; } #endif - -// -// system clock -// - -template<> -[[gnu::hot]] -ircd::system_point -ircd::now() -{ - return system_clock::now(); -} - -// -// steady clock -// - -template<> -[[gnu::hot]] -ircd::steady_point -ircd::now() -{ - return steady_clock::now(); -}