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_Timer_hpp
10 #define anna_timex_Timer_hpp
12 #include <anna/timex/TimeEvent.hpp>
19 Clase base para los temporizadores. Se activa una unica vez y cuando transcurren los milisegundos
20 establecidos por TimeEvent::getTimeout se invoca al metodo #expire. La implementacion de este metodo
21 sera particular para cada uno de los temporizadores.
25 class Timer : public TimeEvent {
30 @param name Nombre logico de este temporizador.
31 @param timeout Duracion del temporizador indicado en milisegundos.
33 Timer(const char* name, const Millisecond & timeout) :
34 TimeEvent(anna_ptrnumber_cast(this), timeout),
39 Devuelve una cadena con la informacion referente a este temporizador.
40 \return Una cadena con la informacion referenta a este temporizador.
42 std::string asString() const
44 std::string msg("Timer { ");
45 msg += TimeEvent::asString();