aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-03-20 11:30:04 -0700
committerBrent Stapleton <brent.stapleton@ettus.com>2019-03-22 15:43:19 -0700
commite88f23b2bb8b63aaf7fd8bd90c39250f53fbc6cf (patch)
tree542be5ba0ee0d6c7b94ae3c3f4c405aa68f17b50 /host
parentd399ff0ac87aafc79729f18ac951200c71019a21 (diff)
downloaduhd-e88f23b2bb8b63aaf7fd8bd90c39250f53fbc6cf.tar.gz
uhd-e88f23b2bb8b63aaf7fd8bd90c39250f53fbc6cf.tar.bz2
uhd-e88f23b2bb8b63aaf7fd8bd90c39250f53fbc6cf.zip
python: Add operators and get_full_secs() to time_spec_t
This exposes existing operators and API calls from C++ into Python.
Diffstat (limited to 'host')
-rw-r--r--host/lib/types/time_spec_python.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/types/time_spec_python.hpp b/host/lib/types/time_spec_python.hpp
index 12489fd44..3f87e9885 100644
--- a/host/lib/types/time_spec_python.hpp
+++ b/host/lib/types/time_spec_python.hpp
@@ -27,13 +27,17 @@ void export_time_spec(py::module& m)
.def("get_tick_count" , &time_spec_t::get_tick_count )
.def("to_ticks" , &time_spec_t::to_ticks )
.def("get_real_secs" , &time_spec_t::get_real_secs )
+ .def("get_full_secs" , &time_spec_t::get_full_secs )
.def("get_frac_secs" , &time_spec_t::get_frac_secs )
.def(py::self += time_spec_t())
+ .def(py::self -= time_spec_t())
+ .def(py::self + time_spec_t())
+ .def(py::self - time_spec_t())
.def(py::self += double())
+ .def(py::self -= double())
.def(py::self + double())
- .def(py::self + time_spec_t())
- .def(py::self -= time_spec_t())
+ .def(py::self - double())
;
}