AutoTime.hpp
浏览该文件的文档.
//
// AutoTime.hpp
// MNN
//
// Created by MNN on 2018/07/27.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef AutoTime_hpp
#define AutoTime_hpp
#include <stdint.h>
#include <stdio.h>
#include "MNNDefine.h"
namespace MNN {
class MNN_PUBLIC AutoTime {
public:
AutoTime(int line, const char* func);
~AutoTime();
AutoTime(const AutoTime&) = delete;
AutoTime(const AutoTime&&) = delete;
AutoTime& operator=(const AutoTime&) = delete;
AutoTime& operator=(const AutoTime&&) = delete;
private:
int mLine;
char* mName;
uint64_t mCurrentTime;
};
} // namespace MNN
#ifdef MNN_OPEN_TIME_TRACE
#define AUTOTIME MNN::AutoTime ___t(__LINE__, __func__)
#else
#define AUTOTIME
#endif
#endif /* AutoTime_hpp */
MNN_PUBLIC
#define MNN_PUBLIC
Definition: MNNDefine.h:53
MNN::AutoTime
Definition: AutoTime.hpp:19
MNN
Definition: AutoTime.hpp:16
MNNDefine.h