From e23ef9cc1b639de9f70a3bb7ea66dd9724577ee8 Mon Sep 17 00:00:00 2001 From: soburi Date: Wed, 13 Sep 2017 08:18:03 +0900 Subject: [PATCH] Correcting the calculation of micros() --- cores/arduino/delay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/arduino/delay.c b/cores/arduino/delay.c index 7640236..7a7bec1 100644 --- a/cores/arduino/delay.c +++ b/cores/arduino/delay.c @@ -36,7 +36,7 @@ unsigned long millis( void ) // values to calculate micros. If there is a pending SysTick, add one to the millis counter in the calculation. unsigned long micros( void ) { - return RTIMER_NOW() * 1000000/RTIMER_ARCH_SECOND; + return RTIMER_NOW() /(RTIMER_ARCH_SECOND/1000000); } static struct etimer delay_timer;