Improved documentation & minor interface revision (#541)

This commit is contained in:
Changho Hwang
2025-06-03 14:26:27 -07:00
committed by GitHub
parent c184485808
commit 83356957bd
42 changed files with 650 additions and 334 deletions

View File

@@ -9,15 +9,4 @@
namespace nb = nanobind;
using namespace mscclpp;
void register_utils(nb::module_& m) {
nb::class_<Timer>(m, "Timer")
.def(nb::init<int>(), nb::arg("timeout") = -1)
.def("elapsed", &Timer::elapsed)
.def("set", &Timer::set, nb::arg("timeout"))
.def("reset", &Timer::reset)
.def("print", &Timer::print, nb::arg("name"));
nb::class_<ScopedTimer, Timer>(m, "ScopedTimer").def(nb::init<std::string>(), nb::arg("name"));
m.def("get_host_name", &getHostName, nb::arg("maxlen"), nb::arg("delim"));
}
void register_utils(nb::module_& m) { m.def("get_host_name", &getHostName, nb::arg("maxlen"), nb::arg("delim")); }