You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
365 B
10 lines
365 B
#include "chrono.h"
|
|
#include "src/helpers.h"
|
|
|
|
#include <chrono>
|
|
|
|
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(); });
|
|
}
|