[core] Remove unused parts of chrono.hpp
This commit is contained in:
@@ -18,31 +18,6 @@ using Duration = Clock::duration;
|
||||
using SystemTimePoint = SystemClock::time_point;
|
||||
using SystemDuration = SystemClock::duration;
|
||||
|
||||
template <class _Clock, class _Duration>
|
||||
_Duration toDuration(std::chrono::time_point<_Clock, _Duration> time_point) {
|
||||
return time_point.time_since_epoch();
|
||||
}
|
||||
|
||||
template <class _Duration>
|
||||
Seconds asSeconds(_Duration duration) {
|
||||
return std::chrono::duration_cast<Seconds>(duration);
|
||||
}
|
||||
|
||||
template <class _Clock, class _Duration>
|
||||
Seconds toSeconds(std::chrono::time_point<_Clock, _Duration> time_point) {
|
||||
return asSeconds(toDuration<_Clock, _Duration>(time_point));
|
||||
}
|
||||
|
||||
template <class _Duration>
|
||||
Milliseconds asMilliseconds(_Duration duration) {
|
||||
return std::chrono::duration_cast<Milliseconds>(duration);
|
||||
}
|
||||
|
||||
template <class _Clock, class _Duration>
|
||||
Milliseconds toMilliseconds(std::chrono::time_point<_Clock, _Duration> time_point) {
|
||||
return asMilliseconds(toDuration<_Clock, _Duration>(time_point));
|
||||
}
|
||||
|
||||
namespace util {
|
||||
|
||||
// Returns the RFC1123 formatted date. E.g. "Tue, 04 Nov 2014 02:13:24 GMT"
|
||||
|
||||
@@ -5,22 +5,6 @@
|
||||
#include <cstdio>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
template Duration toDuration<Clock, Duration>(TimePoint);
|
||||
template SystemDuration toDuration<SystemClock, SystemDuration>(SystemTimePoint);
|
||||
|
||||
template Seconds asSeconds<Duration>(Duration);
|
||||
template Seconds asSeconds<Milliseconds>(Milliseconds);
|
||||
|
||||
template Seconds toSeconds<Clock, Duration>(TimePoint);
|
||||
template Seconds toSeconds<SystemClock, SystemDuration>(SystemTimePoint);
|
||||
|
||||
template Milliseconds asMilliseconds<Duration>(Duration);
|
||||
template Milliseconds asMilliseconds<Seconds>(Seconds);
|
||||
|
||||
template Milliseconds toMilliseconds<Clock, Duration>(TimePoint);
|
||||
template Milliseconds toMilliseconds<SystemClock, SystemDuration>(SystemTimePoint);
|
||||
|
||||
namespace util {
|
||||
|
||||
static const char *week[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
||||
|
||||
Reference in New Issue
Block a user