You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
257 B
16 lines
257 B
#include <M5StickC.h>
|
|
#include "Util.h"
|
|
|
|
unsigned long millis_since(unsigned long timestamp)
|
|
{
|
|
unsigned long now = millis();
|
|
|
|
if (now < timestamp)
|
|
{
|
|
return (4294967295 - timestamp) + millis();
|
|
}
|
|
else
|
|
{
|
|
return millis() - timestamp;
|
|
}
|
|
}
|
|
|