#pragma once

#include "../../../include/dv-processing/core/time.hpp"

#include <pybind11/pybind11.h>

namespace py = pybind11;

/**
 * @brief Bindings for time related functions.
 * @param m
 */
void bind_time(py::module &m) {
	using pybind11::operator""_a;

	m.def("now", &dv::now, "Returns current system clock time in unix microsecond format");

	m.def("toTimePoint", &dv::toTimePoint, "timestamp"_a,
		"Convert a 64-bit integer microsecond timestamp into a time point.");

	m.def(
		"fromTimePoint",
		[](const dv::TimePoint &timepoint) {
			return dv::fromTimePoint(timepoint);
		},
		"Convert a time-point into a 64-bit integer microsecond timestamp.");
}
