Skip to content

Commit

Permalink
Merge pull request #50 from soburi/correct_micros
Browse files Browse the repository at this point in the history
Correcting the calculation of micros()
  • Loading branch information
soburi authored Sep 13, 2017
2 parents 2f5538b + e23ef9c commit c05a37d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/arduino/delay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c05a37d

Please sign in to comment.