Rob Toulson / Mbed 2 deprecated PE_09-03_SimpleTimer

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
robt
Date:
Fri May 24 21:47:31 2013 +0000
Commit message:
by Rob Toulson and Tim Wilmshurst from textbook "Fast and Effective Embedded Systems Design: Applying the ARM mbed"

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 24 21:47:31 2013 +0000
@@ -0,0 +1,14 @@
+/* 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
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri May 24 21:47:31 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file