#ifndef MTIMEOUT_H
#define MTIMEOUT_H

#include <TTimer.h>

class MTimeout : public TTimer
{
    Bool_t Notify(TTimer *t)
    {
        TurnOff(); // remove from system list
        return kFALSE;
    }

public:
    MTimeout(Long_t ms=500) : TTimer(ms, kFALSE)
    {
        // Use SetTime to change the timing
        if (ms) TurnOn(); // Add to system list
    }

    void Start()
    {
        Reset();  // reset before adding
        TurnOn(); // Add to system list
    }
};


#endif
