#include "amsgenlib.hpp" utimer::utimer() { t = micros(); } utimer::~utimer() { t = 0; } void utimer::set() { t = micros(); } bool utimer::isafter(unsigned long N) { bool ret = 0; unsigned long t2,lmx; if(t+N ((t-lmx)+N)) { ret = 1; } } else { t2 = micros(); if(t2>t+N) { ret = 1; } } return ret; } void utimer::delay(unsigned long N) { while(!this->isafter(N)) { } return; }