//! \~\file pisystemtests.h
//! \~\ingroup System
//! \~\brief
//! \~english System timing calibration values
//! \~russian Калибровочные значения системного времени
/*
    PIP - Platform Independent Primitives
    System tests results (see system_test folder)
    Ivan Pelipenko peri4ko@yandex.ru

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program 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 Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef PISYSTEMTESTS_H
#define PISYSTEMTESTS_H

#include "pibase.h"

//! \~\ingroup System
//! \~\brief
//! \~english Calibration values loaded from system test results.
//! \~russian Калибровочные значения, загружаемые из результатов системных тестов.
namespace PISystemTests {

//! \~\brief
//! \~english Measured timer resolution in nanoseconds.
//! \~russian Измеренное разрешение таймера в наносекундах.
extern PIP_EXPORT long time_resolution_ns;

//! \~\brief
//! \~english Measured elapsed-time correction in nanoseconds.
//! \~russian Поправка измеренного времени в наносекундах.
extern PIP_EXPORT long time_elapsed_ns;

//! \~\brief
//! \~english Delay correction for \a usleep() in microseconds.
//! \~russian Поправка задержки для \a usleep() в микросекундах.
extern PIP_EXPORT long usleep_offset_us;

//! \~\ingroup System
//! \~\brief
//! \~english Initializes calibration values for %PISystemTests.
//! \~russian Инициализирует калибровочные значения для %PISystemTests.
class PIP_EXPORT PISystemTestReader {
public:
	//! \~english Reads calibration values from the system configuration when available.
	//! \~russian Считывает калибровочные значения из системной конфигурации, если она доступна.
	PISystemTestReader();
};

//! \~\brief
//! \~english Global reader that initializes calibration values during startup.
//! \~russian Глобальный объект, инициализирующий калибровочные значения при старте.
extern PIP_EXPORT PISystemTestReader pisystestreader;

} // namespace PISystemTests

#endif // PISYSTEMTESTS_H
