From 4cf56f59d1e2a9a26af008387550394eb2b35524 Mon Sep 17 00:00:00 2001
From: ymd-stella <world.applepie@gmail.com>
Date: Sat, 6 Apr 2024 09:09:51 +0900
Subject: [PATCH] Add frame_publisher::get_tracking_time_elapsed_ms

---
 src/stella_vslam/publish/frame_publisher.cc | 4 ++++
 src/stella_vslam/publish/frame_publisher.h  | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/src/stella_vslam/publish/frame_publisher.cc b/src/stella_vslam/publish/frame_publisher.cc
index f2d459ba..a66fd346 100644
--- a/src/stella_vslam/publish/frame_publisher.cc
+++ b/src/stella_vslam/publish/frame_publisher.cc
@@ -109,6 +109,10 @@ cv::Mat frame_publisher::get_image() {
     return img;
 }
 
+double frame_publisher::get_tracking_time_elapsed_ms() {
+    return elapsed_ms_;
+}
+
 unsigned int frame_publisher::draw_tracked_points(cv::Mat& img, const std::vector<cv::KeyPoint>& curr_keypts,
                                                   const std::vector<std::shared_ptr<data::landmark>>& curr_lms,
                                                   const bool mapping_is_enabled,
diff --git a/src/stella_vslam/publish/frame_publisher.h b/src/stella_vslam/publish/frame_publisher.h
index b4c2e447..5c9ad27e 100644
--- a/src/stella_vslam/publish/frame_publisher.h
+++ b/src/stella_vslam/publish/frame_publisher.h
@@ -61,6 +61,8 @@ class frame_publisher {
 
     cv::Mat get_image();
 
+    double get_tracking_time_elapsed_ms();
+
 protected:
     unsigned int draw_tracked_points(cv::Mat& img, const std::vector<cv::KeyPoint>& curr_keypts,
                                      const std::vector<std::shared_ptr<data::landmark>>& curr_lms,