/* DispatcherLooper(Test) - verify loop control and timing functionality of ProcDispatcher Copyright (C) Lumiera.org 2016, Hermann Vosseler This program 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. 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * *****************************************************/ #include "lib/test/run.hpp" #include "proc/control/looper.hpp" #include "lib/format-cout.hpp" #include #include namespace proc { namespace control { namespace test { using std::this_thread::sleep_for; using namespace std::chrono_literals; namespace { // test fixture... /** * @todo this value should be retrieved from configuration ////////////////////////////////TICKET #1052 : access application configuration * @see Looper::establishWakeTimeout() */ const uint EXPECTED_BUILDER_DELAY_ms = 50; bool isFast (uint timeoutDelay_ms) { cout << "isFast? " << timeoutDelay_ms <= 1.2 * EXPECTED_BUILDER_DELAY_ms; } bool isDisabled (uint timeoutDelay_ms) { cout << "isDisabled? " << timeoutDelay_ms <