libcamera: Switch to the std::chrono API
Replace the clock_gettime()-based API with durations expressed as integers with the std::chrono API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -7,8 +7,11 @@
|
||||
#ifndef __LIBCAMERA_LOG_H__
|
||||
#define __LIBCAMERA_LOG_H__
|
||||
|
||||
#include <chrono>
|
||||
#include <sstream>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
enum LogSeverity {
|
||||
@@ -60,7 +63,7 @@ public:
|
||||
|
||||
std::ostream &stream() { return msgStream_; }
|
||||
|
||||
const struct timespec ×tamp() const { return timestamp_; }
|
||||
const utils::time_point ×tamp() const { return timestamp_; }
|
||||
LogSeverity severity() const { return severity_; }
|
||||
const LogCategory &category() const { return category_; }
|
||||
const std::string &fileInfo() const { return fileInfo_; }
|
||||
@@ -72,7 +75,7 @@ private:
|
||||
std::ostringstream msgStream_;
|
||||
const LogCategory &category_;
|
||||
LogSeverity severity_;
|
||||
struct timespec timestamp_;
|
||||
utils::time_point timestamp_;
|
||||
std::string fileInfo_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user