Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

myTimer.h

Committer:
AkinoriHashimoto
Date:
2016-03-29
Revision:
5:c9304777ce1a
Parent:
2:3060a6604f13
Child:
6:4cb4eea64805

File content as of revision 5:c9304777ce1a:

#pragma once

#include "mbed.h"

/** Timer Class.
 *
 *  stop, reset, start, read_ms.
*/
class myTimer
{
private:
    Timer timer;
    
public:
    myTimer();
    void stop();
    void reset();
    void start(bool _RESET=false);
    int read_ms(bool _START=true, bool _RESET=true, bool _STOP=true);
    int read_us(bool _START=true, bool _RESET=true, bool _STOP=true);
    void wait_ms(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true);
};

// EOF