Debian Codegraph @

src/pycolmap/timer.h

raw
1 #pragma once
2
3 #include "colmap/util/timer.h"
4
5 #include <pybind11/pybind11.h>
6
7 namespace py = pybind11;
8
9 void BindTimer(py::module& m) {
10 py::classh<colmap::Timer>(m, "Timer")
11 .def(py::init<>())
12 .def("start", &colmap::Timer::Start)
13 .def("restart", &colmap::Timer::Restart)
14 .def("pause", &colmap::Timer::Pause)
15 .def("resume", &colmap::Timer::Resume)
16 .def("reset", &colmap::Timer::Reset)
17 .def("elapsed_micro_seconds", &colmap::Timer::ElapsedMicroSeconds)
18 .def("elapsed_seconds", &colmap::Timer::ElapsedSeconds)
19 .def("elapsed_minutes", &colmap::Timer::ElapsedMinutes)
20 .def("elapsed_hours", &colmap::Timer::ElapsedHours)
21 .def("print_seconds", &colmap::Timer::PrintSeconds)
22 .def("print_minutes", &colmap::Timer::PrintMinutes)
23 .def("print_hours", &colmap::Timer::PrintHours);
24 }