24 #include <aspect/inifins/time_source.h>
25 #include <aspect/time_source.h>
26 #include <utils/time/clock.h>
27 #include <core/threading/thread_finalizer.h>
42 TimeSourceAspectIniFin::TimeSourceAspectIniFin(
Clock *clock)
54 if (timesource_thread == NULL) {
56 "TimeSourceAspect, but RTTI says it "
57 "has not. ", thread->
name());
66 "is already another time provider.");
76 if (timesource_thread == NULL) {
78 "TimeSourceAspect, but RTTI says it "
79 "has not. ", thread->
name());
virtual void init(Thread *thread)
Initialize thread.
This is supposed to be the central clock in Fawkes.
Thread class encapsulation of pthreads.
Thread aspect that allows to provide a time source to the Fawkes clock.
Thread cannot be initialized.
Base class for exceptions in Fawkes.
virtual void finalize(Thread *thread)
Finalize thread.
void register_ext_timesource(TimeSource *ts, bool make_default=false)
Register an external time source.
TimeSource * get_timesource() const
Get time source.
const char * name() const
Get name of thread.
Thread cannot be finalized.
void append(const char *format,...)
Append messages to the message list.
void remove_ext_timesource(TimeSource *ts=0)
Remove external time source.
Aspect initializer/finalizer base class.