by Rob Toulson and Tim Wilmshurst from textbook "Fast and Effective Embedded Systems Design: Applying the ARM mbed"
main.cpp
- Committer:
- robt
- Date:
- 2013-05-24
- Revision:
- 0:37df0df7aa8f
File content as of revision 0:37df0df7aa8f:
/* Program Example 9.3: A simple Timer example, from mbed web site. Activate Tera Term terminal to test. */ #include "mbed.h" Timer t; // define Timer with name “t” Serial pc(USBTX, USBRX); int main() { t.start(); //start the timer pc.printf("Hello World!\n"); t.stop(); //stop the timer pc.printf("The time taken was %f seconds\n", t.read()); //print to pc }