simplesync/src/python_module.cpp
2024-01-11 17:29:50 +01:00

19 lines
489 B
C++

#include <chrono>
#include <pybind11/pybind11.h>
#include <pybind11/chrono.h>
#include "simplesync.hpp"
namespace py = pybind11;
typedef simplesync::SimpleSync<std::chrono::time_point<std::chrono::steady_clock>,
std::chrono::nanoseconds>
SimpleS;
PYBIND11_MODULE(simplesync, m) {
py::class_<SimpleS>(m, "SimpleSync")
.def(py::init([]() { return std::unique_ptr<SimpleS>(new SimpleS(nullptr,nullptr,nullptr)); }))
.def(update);
}