mirror of
https://github.com/matrix-construct/construct
synced 2024-11-12 04:51:08 +01:00
ircd: Inline single jump without LTO for now.
This commit is contained in:
parent
ea1a18adfe
commit
a9a77f86d1
2 changed files with 16 additions and 24 deletions
|
@ -152,6 +152,14 @@ ircd::time(time_t &ref)
|
|||
return ref;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline ircd::system_point
|
||||
__attribute__((always_inline, artificial, flatten))
|
||||
ircd::now<ircd::system_point>()
|
||||
{
|
||||
return system_clock::now();
|
||||
}
|
||||
|
||||
//
|
||||
// steady_clock
|
||||
//
|
||||
|
@ -168,3 +176,11 @@ ircd::now()
|
|||
|
||||
return std::chrono::duration_cast<unit>(now);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline ircd::steady_point
|
||||
__attribute__((always_inline, artificial, flatten))
|
||||
ircd::now<ircd::steady_point>()
|
||||
{
|
||||
return steady_clock::now();
|
||||
}
|
||||
|
|
|
@ -253,27 +253,3 @@ ircd::microtime()
|
|||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// system clock
|
||||
//
|
||||
|
||||
template<>
|
||||
[[gnu::hot]]
|
||||
ircd::system_point
|
||||
ircd::now<ircd::system_point>()
|
||||
{
|
||||
return system_clock::now();
|
||||
}
|
||||
|
||||
//
|
||||
// steady clock
|
||||
//
|
||||
|
||||
template<>
|
||||
[[gnu::hot]]
|
||||
ircd::steady_point
|
||||
ircd::now<ircd::steady_point>()
|
||||
{
|
||||
return steady_clock::now();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue