Core/Utilities: Add custom _days chrono literal
(cherry picked from commit d5de96e46bf52ccb2fffe01c0709f9238977a80e)
This commit is contained in:
@@ -39,4 +39,9 @@ typedef std::chrono::system_clock::time_point SystemTimePoint;
|
||||
/// Makes std::chrono_literals globally available.
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
constexpr std::chrono::hours operator""_days(unsigned long long days)
|
||||
{
|
||||
return std::chrono::hours(days * 24h);
|
||||
}
|
||||
|
||||
#endif // _DURATION_H_
|
||||
|
||||
Reference in New Issue
Block a user