tests/xtimer_now64: Start time measure after print

Printing can take a lot of time over a serial connection. On the atmega
board it takes more than 2 ms, skewing the first measurement over the
threshold value and causing a test failure. This moves the print
statement above the first measumerement to prevent the skew.
This commit is contained in:
Koen Zandberg 2018-05-16 16:49:03 +02:00
parent af829e2da4
commit 81cff65c57
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -34,8 +34,8 @@ int main(void)
uint64_t diff_min = UINT64_MAX;
uint64_t diff_max = 0;
uint64_t diff_sum = 0;
xtimer_ticks64_t before = xtimer_now64();
print_str("[START]\n");
xtimer_ticks64_t before = xtimer_now64();
while(--n) {
xtimer_ticks64_t now = xtimer_now64();
xtimer_ticks64_t diff = xtimer_diff64(now, before);