me-no-dev / RasPiArduino

Arduino Framework for RaspberryPI
333 stars 75 forks source link

(minor issue) #113

Open thijses opened 3 years ago

thijses commented 3 years ago

define STCV ((uint64_t)(STCLO | ((uint64_t)STCHI << 32)))

define micros() (unsigned long)(STCV)

define millis() (unsigned long)(STCV / 1000)

why bother converting to 64 bit, only to then convert back to 32 bit? how about:

define micros() STCLO

define millis() (STCLO / 1000L)