1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #ifndef anna_timex_internal_TickProducer_hpp
10 #define anna_timex_internal_TickProducer_hpp
12 #include <anna/core/mt/Runnable.hpp>
21 * Esta clase se ejecuta desde un thread 'real' aunque estemos generando la librerÃa en modo ST,
22 * para evitar que la librerÃa tenga que generar pulso de reloj mediante el SIGALRM.
26 void requestStop() throw() { a_requestedStop = true; }
28 // Para poder clonarlo
29 void setfd(const int fd) throw() { a_fdWrite = fd; }
32 Engine& a_timeController;
34 Millisecond a_expectedTime;
38 TickProducer(Engine* timeController, const int fdWrite);
40 bool isInPause() const throw() { return a_isInPause; }
41 void setIsInPause(const bool isInPause) throw() { a_isInPause = isInPause; }
44 void resetExpectedTime() throw() { a_expectedTime = 0; }
45 Millisecond calculeSlice(const Millisecond & msnow) throw();
47 static void* exec(void* arg) throw();