You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
420 B
C++

1 year ago
#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