Timer Hello World

Dependencies:   mbed

mbed 2 and mbed OS 5

This is an mbed 2 example. For an mbed-os example, please see:

Import programTimer_HelloWorld

Timer Hello World

Committer:
mbed_official
Date:
Wed Feb 13 17:28:57 2013 +0000
Revision:
0:27e1de20d3cb
Timer Hello World

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:27e1de20d3cb 1 #include "mbed.h"
mbed_official 0:27e1de20d3cb 2
mbed_official 0:27e1de20d3cb 3 Timer t;
mbed_official 0:27e1de20d3cb 4
mbed_official 0:27e1de20d3cb 5 int main() {
mbed_official 0:27e1de20d3cb 6 t.start();
mbed_official 0:27e1de20d3cb 7 printf("Hello World!\n");
mbed_official 0:27e1de20d3cb 8 t.stop();
mbed_official 0:27e1de20d3cb 9 printf("The time taken was %f seconds\n", t.read());
mbed_official 0:27e1de20d3cb 10 }