mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-13 09:46:00 +00:00
Improved documentation & minor interface revision (#541)
This commit is contained in:
@@ -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")); }
|
||||
|
||||
Reference in New Issue
Block a user