Eurobot_2012_Secondary

Dependencies:   mbed tvmet

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers system.cpp Source File

system.cpp

00001 #include "system.h"
00002 
00003 float cpupercent; //defining the extern
00004 void measureCPUidle (void const* arg) {
00005     
00006     Timer timer;
00007     cpupercent = 0; //defined in system.h
00008     
00009     while(1) {
00010         timer.reset();
00011         timer.start();
00012         wait(1); // looks like wait uses a RTC
00013         
00014         int thistime = timer.read_us()-1000000;
00015         cpupercent = thistime;
00016     }
00017 }