clock: fix incorrect calculation on timespec
Here, TICK2USEC() should be used instead of TICK2MSEC(). This results in
a subtle bug that incorrectly calculating timespec when period of the
system clock tick is not divided evenly by 1000us.
@@ -165,7 +165,7 @@ int clock_systimespec(FAR struct timespec *ts)
/* Get the time since power-on in seconds and milliseconds */
- usecs = TICK2MSEC(clock_systimer());
+ usecs = TICK2USEC(clock_systimer());
secs = usecs / USEC_PER_SEC;
/* Return the elapsed time in seconds and nanoseconds */
