|
|
|
@ -1,23 +1,24 @@ |
|
|
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
#include <spch.h> |
|
|
|
|
|
|
|
|
|
using Nanosecond = std::ratio<1,1000000000>; |
|
|
|
|
using Microsecond = std::ratio<1,1000000>; |
|
|
|
|
using Millisecond = std::ratio<1,1000>; |
|
|
|
|
using Second = std::ratio<1,1>; |
|
|
|
|
using Minute = std::ratio<60, 1>; |
|
|
|
|
using Hour = std::ratio<3600, 1>; |
|
|
|
|
using Day = std::ratio<84600, 1>; |
|
|
|
|
|
|
|
|
|
using SysClock = std::chrono::system_clock; |
|
|
|
|
using SteadyClock = std::chrono::steady_clock; |
|
|
|
|
using FileClock = std::chrono::file_clock; |
|
|
|
|
using UtcClock = std::chrono::utc_clock; |
|
|
|
|
|
|
|
|
|
template<typename P> |
|
|
|
|
struct TimeSpan
|
|
|
|
|
{ |
|
|
|
|
#include <bakatoolspch.h> |
|
|
|
|
|
|
|
|
|
namespace Bk { |
|
|
|
|
using Nanosecond = std::ratio<1,1000000000>; |
|
|
|
|
using Microsecond = std::ratio<1,1000000>; |
|
|
|
|
using Millisecond = std::ratio<1,1000>; |
|
|
|
|
using Second = std::ratio<1,1>; |
|
|
|
|
using Minute = std::ratio<60, 1>; |
|
|
|
|
using Hour = std::ratio<3600, 1>; |
|
|
|
|
using Day = std::ratio<84600, 1>; |
|
|
|
|
|
|
|
|
|
using SysClock = std::chrono::system_clock; |
|
|
|
|
using SteadyClock = std::chrono::steady_clock; |
|
|
|
|
using FileClock = std::chrono::file_clock; |
|
|
|
|
using UtcClock = std::chrono::utc_clock; |
|
|
|
|
|
|
|
|
|
template<typename P> |
|
|
|
|
struct TimeSpan
|
|
|
|
|
{ |
|
|
|
|
TimeSpan(int interval = 0)
|
|
|
|
|
: interval(std::chrono::duration<long int, P>(interval)) {} |
|
|
|
|
TimeSpan(std::chrono::duration<long int, P> interval) |
|
|
|
@ -37,4 +38,5 @@ struct TimeSpan |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::chrono::duration<long int, P> interval; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
} |