mirror of https://github.com/ARMmbed/mbed-os.git
Added additional read to care of lazyily initialized timer
parent
7900863c4d
commit
25e2b8838a
|
|
@ -63,6 +63,8 @@ void get_cpu_usage()
|
||||||
void test_cpu_info(void)
|
void test_cpu_info(void)
|
||||||
{
|
{
|
||||||
mbed_stats_cpu_t stats;
|
mbed_stats_cpu_t stats;
|
||||||
|
// Additional read to make sure timer is initialized
|
||||||
|
mbed_stats_cpu_get(&stats);
|
||||||
Thread::wait(1);
|
Thread::wait(1);
|
||||||
mbed_stats_cpu_get(&stats);
|
mbed_stats_cpu_get(&stats);
|
||||||
TEST_ASSERT_NOT_EQUAL(0, stats.uptime);
|
TEST_ASSERT_NOT_EQUAL(0, stats.uptime);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue