Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
main.cpp
- Committer:
- fkgjh
- Date:
- 2015-10-15
- Revision:
- 0:6643d1c94bd0
File content as of revision 0:6643d1c94bd0:
#include "mbed.h"
InterruptIn SW7(PB_3);
InterruptIn SW6(PA_10);
Timer timer;
static double tidSek;
void startKlokke()
{
timer.reset();
timer.start();
}
void stopKlokke()
{
timer.stop();
tidSek=timer.read_ms()/1000.0;
printf("tid %.3f sek\r\n", tidSek);
}
int main()
{
SW7.fall(&startKlokke);
SW6.fall(&stopKlokke);
while (true)
{
wait_ms(200);
}
}