17 m.doc() =
"Nanobind bindings for Gibis classes";
18 nb::class_<PClockNs>(m,
"PClockNs")
23 .def_prop_rw(
"offsetTimeNs",
24 [](PClockNs &c) {
return c.getOffsetTimeNs(); },
25 [](PClockNs &c, time_t value) { c.setOffsetTimeNs(value); })
28 .def(
"getFullTimeNs", &PClockNs::getFullTimeNs,
29 "Get the full time in nanoseconds")
31 .def(
"getDateNs", &PClockNs::getDateNs,
32 "Get the date at nanosecond precision")
34 .def(
"getDateCompactNs", &PClockNs::getDateCompactNs,
35 "Get the date at nanosecond precision in compact format")
37 .def(
"now", &PClockNs::now,
38 "Get the full time in nanoseconds (alias for getFullTimeNs)")
40 .def(
"sleep", [](
const PClockNs &c, time_t ellapsedTime) {
41 c.sleep(ellapsedTime);
43 "Sleep for the given elapsed time in nanoseconds");