Akinori Hashimoto / myTimer

Dependents:   DetectFreqAboveTH RN41

myTimer.h

Committer:
AkinoriHashimoto
Date:
2017-09-29
Revision:
6:4cb4eea64805
Parent:
5:c9304777ce1a
Child:
7:8fbe0cf9d582

File content as of revision 6:4cb4eea64805:

#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);
    void wait_u(int waitTime, bool _START=true, bool _RESET=true, bool _STOP=true);
};

// EOF