aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2018-10-25 09:33:48 +0200
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-10-25 16:33:51 -0700
commiteefba16d7651d06dcdb87c5fcb4c823b06972e33 (patch)
tree40b16cc73a5ec6acaa33166aad1cd09ac88a54fa /host
parent1d5c186cf06c758747922da597e0fd54d78f7209 (diff)
downloaduhd-eefba16d7651d06dcdb87c5fcb4c823b06972e33.tar.gz
uhd-eefba16d7651d06dcdb87c5fcb4c823b06972e33.tar.bz2
uhd-eefba16d7651d06dcdb87c5fcb4c823b06972e33.zip
python: Add missing constructors of time_spec_t
Currently Python interface of time_spec_t exposes only constructor with 'double' parameter. Other constructors are also important as they provide higher precision. This change adds them to the Python API.
Diffstat (limited to 'host')
-rw-r--r--host/lib/types/time_spec_python.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/host/lib/types/time_spec_python.hpp b/host/lib/types/time_spec_python.hpp
index f411af0b0..219dd076b 100644
--- a/host/lib/types/time_spec_python.hpp
+++ b/host/lib/types/time_spec_python.hpp
@@ -14,6 +14,9 @@ void export_time_spec()
using time_spec_t = uhd::time_spec_t;
bp::class_<time_spec_t>("time_spec", bp::init<double>())
+ //Additional constructors
+ .def(bp::init<int64_t, double>())
+ .def(bp::init<int64_t, long, double>())
// Methods
.def("from_ticks" , &time_spec_t::from_ticks )