mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-04-25 17:42:30 +03:00
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
/*
|
|
* Copyright (C) 2019 Codership Oy <info@codership.com>
|
|
*
|
|
* This file is part of wsrep-lib.
|
|
*
|
|
* Wsrep-lib is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Wsrep-lib is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with wsrep-lib. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/** @file chrono.hpp
|
|
*
|
|
* Type definitions to work around differences in <chrono> implementation
|
|
* differences between C++11 compatible and ancient compilers.
|
|
*/
|
|
|
|
#ifndef WSREP_CHRONO_HPP
|
|
#define WSREP_CHORNO_HPP
|
|
|
|
#include <chrono>
|
|
|
|
namespace wsrep
|
|
{
|
|
namespace chrono
|
|
{
|
|
#if defined(__GNUG__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
|
|
template <typename T>
|
|
using time_point = std::chrono::time_point<T>;
|
|
using steady_clock = std::chrono::monotonic_clock;
|
|
#else
|
|
template <typename T>
|
|
using time_point = std::chrono::time_point<T>;
|
|
using steady_clock = std::chrono::steady_clock;
|
|
}
|
|
#endif // defined(__GNUG__) && (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
|
|
|
|
}
|
|
|
|
#endif // WSREP_CHRONO_HPP
|