Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers myTimer.h Source File

myTimer.h

00001 #pragma once
00002 
00003 #include "mbed.h"
00004 
00005 /** Timer Class.
00006  *
00007  *  stop, reset, start, read_ms.
00008 */
00009 class myTimer
00010 {
00011 private:
00012     Timer timer;
00013     
00014 public:
00015     myTimer();
00016     void stop();
00017     void reset();
00018     void start(bool _RESET=false);
00019     int read_ms(bool _START=true, bool _RESET=true, bool _STOP=true);
00020     int read_us(bool _START=true, bool _RESET=true, bool _STOP=true);
00021     void wait_ms(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true);
00022     void wait_us(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true);
00023 };
00024 
00025 // EOF