Skip to content

Commit 25e2b88

Browse files
author
Deepika
committed
Added additional read to care of lazyily initialized timer
1 parent 7900863 commit 25e2b88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

TESTS/mbed_platform/stats_cpu/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ void get_cpu_usage()
6363
void test_cpu_info(void)
6464
{
6565
mbed_stats_cpu_t stats;
66+
// Additional read to make sure timer is initialized
67+
mbed_stats_cpu_get(&stats);
6668
Thread::wait(1);
6769
mbed_stats_cpu_get(&stats);
6870
TEST_ASSERT_NOT_EQUAL(0, stats.uptime);

0 commit comments

Comments
 (0)