summaryrefslogtreecommitdiff
path: root/gr-uhd/python/uhd
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2014-04-14 23:47:50 +0200
committerMarcus Müller <marcus@hostalia.de>2014-04-14 23:57:31 +0200
commit9df52c1b0c598872c7ae1cd92c885ef1e92f4a4f (patch)
tree4422a7696762aca39ffd93dc0f328045a995d038 /gr-uhd/python/uhd
parent76970d54f3a6551751d481c63ea54c0794fc2591 (diff)
added subtraction and addition to time_spec_t
Diffstat (limited to 'gr-uhd/python/uhd')
-rw-r--r--gr-uhd/python/uhd/qa_uhd.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gr-uhd/python/uhd/qa_uhd.py b/gr-uhd/python/uhd/qa_uhd.py
index 511c098753..4df0d4273e 100644
--- a/gr-uhd/python/uhd/qa_uhd.py
+++ b/gr-uhd/python/uhd/qa_uhd.py
@@ -35,6 +35,14 @@ class test_uhd(gr_unittest.TestCase):
They may not have a UHD device connected, etc. Don't try to run anything"""
pass
+ def test_time_spec_t (self):
+ seconds = 42.0
+ time = uhd.time_spec_t(seconds)
+ twice_time = time + time;
+ zero_time = time - time;
+ self.assertEqual(time.get_real_secs() * 2, seconds * 2 )
+ self.assertEqual(time.get_real_secs() - time.get_real_secs() , 0.0)
+
def test_stream_args_channel_foo(self):
"""
Try to manipulate the stream args channels for proper swig'ing checks.