m2.mbcp/src/clock_ab.cc

26 lines
515 B
C++
Raw Normal View History

2006-02-05 17:43:00 +00:00
#include "clock_ab.h"
ClockAb::ClockAb(size_t myindex){
Glib::Mutex::Lock lock(_mutex);
printf("ClockAb::ClockAb -- constructor\n");
_cur_index = myindex;
_ticks = 0;
}
TimeStamp ClockAb::inc(){
// lock jusqu'a la fin de la fonction
Glib::Mutex::Lock lock(_mutex);
printf("ClockAb::inc -- creating timestamp\n");
_ticks++;
TimeStamp ts(Protocol::TYPE_ABCAST, _cur_index);
ts.push_back(_ticks);
return ts;
}
2006-03-06 12:42:03 +00:00
bool ClockAb::adjust(TimeStamp ts){
2006-02-05 17:43:00 +00:00
printf("ClockAb::adjust -- NOT IMPLEMENTED\n");
}