
Timer Hello World
Fork of Timer_HelloWorld by
Use
The Timer class is used to measure time. The time will be the amount of time between when the start() and stop() functions are run. The Timer class counts from 0 up.
API
API reference.
Import librarymbed
Diff: main.cpp
- Revision:
- 0:27e1de20d3cb
- Child:
- 2:9152128dba25
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Feb 13 17:28:57 2013 +0000 @@ -0,0 +1,10 @@ +#include "mbed.h" + +Timer t; + +int main() { + t.start(); + printf("Hello World!\n"); + t.stop(); + printf("The time taken was %f seconds\n", t.read()); +}