Subversion Repositories tpanel

Rev

Rev 21 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 93
Line 20... Line 20...
20
#define __TTIMER_H__
20
#define __TTIMER_H__
21
 
21
 
22
#include <thread>
22
#include <thread>
23
#include <chrono>
23
#include <chrono>
24
#include <functional>
24
#include <functional>
-
 
25
#include <atomic>
25
 
26
 
26
#ifdef __ANDROID__
27
#ifdef __ANDROID__
27
typedef unsigned long int ulong;
28
typedef unsigned long int ulong;
28
#endif
29
#endif
29
 
30
 
Line 50... Line 51...
50
        std::function<void(ulong)> _callback{nullptr};
51
        std::function<void(ulong)> _callback{nullptr};
51
        std::chrono::milliseconds mMsec{0};
52
        std::chrono::milliseconds mMsec{0};
52
        bool mOnce{false};
53
        bool mOnce{false};
53
        std::thread mThread;
54
        std::thread mThread;
54
        ulong mCounter{0};
55
        ulong mCounter{0};
55
        bool mStopped{false};
56
        std::atomic<bool> mStopped{false};
56
        bool mRunning{false};
57
        std::atomic<bool> mRunning{false};
57
};
58
};
58
 
59
 
59
#endif
60
#endif