doc/API/html/_auto_time_8hpp_source.html
| MNN 1.0 |
AutoTime.hpp
1 //
2 // AutoTime.hpp
3 // MNN
4 //
5 // Created by MNN on 2018/07/27.
6 // Copyright © 2018, Alibaba Group Holding Limited
7 //
8
9 #ifndef AutoTime_hpp
10 #define AutoTime_hpp
11
12 #include <stdint.h>
13 #include <stdio.h>
14 #include "MNNDefine.h"
15
17
19 class MNN_PUBLIC AutoTime {
20 public:
21AutoTime(int line, const char* func);
22 ~AutoTime();
23AutoTime(const AutoTime&) = delete;
24AutoTime(const AutoTime&&) = delete;
25AutoTime& operator=(const AutoTime&) = delete;
26AutoTime& operator=(const AutoTime&&) = delete;
27
28 private:
29int mLine;
30char* mName;
31 uint64_t mCurrentTime;
32 };
33 } // namespace MNN
34
35 #ifdef MNN_OPEN_TIME_TRACE
36 #define AUTOTIME MNN::AutoTime ___t(__LINE__, __func__)
37 #else
38 #define AUTOTIME
39 #endif
40
41 #endif /* AutoTime_hpp */
#define MNN_PUBLIC
Definition: MNNDefine.h:53
Definition: AutoTime.hpp:19
Definition: AutoTime.hpp:16