diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-03-20 11:30:04 -0700 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-03-22 15:43:19 -0700 |
commit | e88f23b2bb8b63aaf7fd8bd90c39250f53fbc6cf (patch) | |
tree | 542be5ba0ee0d6c7b94ae3c3f4c405aa68f17b50 /host | |
parent | d399ff0ac87aafc79729f18ac951200c71019a21 (diff) | |
download | uhd-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.hpp | 8 |
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()) ; } |