Fix: return event timestamp in _timestamp_at_pos
authorAntoine Busque <antoinebusque@gmail.com>
Thu, 16 Apr 2015 22:11:30 +0000 (18:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 20 Apr 2015 14:23:23 +0000 (10:23 -0400)
Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/reader.py

index 8c07c986d93607406e60a84ce49a84516aa6baa0..6758043599276d3c535708cd08054f034e22895f 100644 (file)
@@ -207,6 +207,11 @@ class TraceCollection:
         ev_ptr = nbt._bt_ctf_iter_read_event(ctf_it_ptr)
         nbt._bt_ctf_iter_destroy(ctf_it_ptr)
 
         ev_ptr = nbt._bt_ctf_iter_read_event(ctf_it_ptr)
         nbt._bt_ctf_iter_destroy(ctf_it_ptr)
 
+        ev = Event.__new__(Event)
+        ev._e = ev_ptr
+
+        return ev.timestamp
+
     def _events(self, begin_pos_ptr, end_pos_ptr):
         ctf_it_ptr = nbt._bt_ctf_iter_create(self._tc, begin_pos_ptr, end_pos_ptr)
 
     def _events(self, begin_pos_ptr, end_pos_ptr):
         ctf_it_ptr = nbt._bt_ctf_iter_create(self._tc, begin_pos_ptr, end_pos_ptr)
 
This page took 0.025724 seconds and 4 git commands to generate.