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