@ -2,6 +2,7 @@
#include "utility/shortestPaths.h"
#include "utility/smtsolver.h"
#include "utility/chrono.h"
PYBIND11_MODULE(utility, m) {
@ -9,4 +10,5 @@ PYBIND11_MODULE(utility, m) {
define_ksp(m);
define_smt(m);
define_chrono(m);
}
@ -0,0 +1,8 @@
#include "chrono.h"
#include "src/helpers.h"
void define_chrono(py::module& m) {
py::class_<std::chrono::milliseconds>(m, "milliseconds")
.def("count", &std::chrono::milliseconds::count)
.def("__str__", [](std::chrono::milliseconds const& t) { std::stringstream strstr; strstr << t.count(); return strstr.str(); });
@ -0,0 +1,5 @@
#pragma once
#include "src/common.h"
void define_chrono(py::module& m);