#ifndef __AMS_GENLIB_HPP__
#define __AMS_GENLIB_HPP__

#include <stdint.h>
#include <Arduino.h>

class utimer
{
public:

  utimer();
  ~utimer();

  unsigned long t;

  //sets the time in memory
  void set();

  //blocking delay
  void delay(unsigned long N);

  //is it N microseconds after the set time?
  //solves wraparound at long overflow
  bool isafter(unsigned long N);
};



#endif