NDK 日誌時間打印

  1. 時間要使用chrono 庫
#ifndef VIDEOPLAY_ANDROIDLOG_H
#define VIDEOPLAY_ANDROIDLOG_H
#endif //VIDEOPLAY_ANDROIDLOG_H

#include <android/log.h>
#include <chrono>

#define DEBUG__TIME0  auto TIME0= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME1  auto TIME1= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME2  auto TIME2= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME3  auto TIME3= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME4  auto TIME4= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME5  auto TIME5= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME6  auto TIME6= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME7  auto TIME7= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME8  auto TIME8= std::chrono::high_resolution_clock::now()
#define DEBUG__TIME9  auto TIME9= std::chrono::high_resolution_clock::now()
#define  millisecond 1000000
#define RUN_TIME(time)  (double)(time).count()/millisecond


#define LOGD(FORMAT,...) __android_log_print(ANDROID_LOG_DEBUG, "sfzoro", FORMAT, ##__VA_ARGS__);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章