Class: Babeltrace::Trace
- Inherits:
-
Object
- Object
- Babeltrace::Trace
- Defined in:
- lib/babeltrace/trace_handle.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#handle_id ⇒ Object
readonly
Returns the value of attribute handle_id.
Instance Method Summary collapse
- #get_path ⇒ Object
- #get_timestamp_begin(clock_type = :REAL) ⇒ Object
- #get_timestamp_end(clock_type = :REAL) ⇒ Object
-
#initialize(context, handle_id) ⇒ Trace
constructor
A new instance of Trace.
Constructor Details
#initialize(context, handle_id) ⇒ Trace
Returns a new instance of Trace.
5 6 7 8 |
# File 'lib/babeltrace/trace_handle.rb', line 5 def initialize(context, handle_id) @context = context @handle_id = handle_id end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
3 4 5 |
# File 'lib/babeltrace/trace_handle.rb', line 3 def context @context end |
#handle_id ⇒ Object (readonly)
Returns the value of attribute handle_id.
4 5 6 |
# File 'lib/babeltrace/trace_handle.rb', line 4 def handle_id @handle_id end |
Instance Method Details
#get_path ⇒ Object
10 11 12 |
# File 'lib/babeltrace/trace_handle.rb', line 10 def get_path Babeltrace.bt_trace_handle_get_path(@context, @handle_id) end |
#get_timestamp_begin(clock_type = :REAL) ⇒ Object
14 15 16 17 |
# File 'lib/babeltrace/trace_handle.rb', line 14 def (clock_type = :REAL) t = Babeltrace.(@context, @handle_id, clock_type) t = Time.at(0, t, :nsec) if clock_type == :REAL end |
#get_timestamp_end(clock_type = :REAL) ⇒ Object
19 20 21 22 |
# File 'lib/babeltrace/trace_handle.rb', line 19 def (clock_type = :REAL) t = Babeltrace.(@context, @handle_id, clock_type) t = Time.at(0, t, :nsec) if clock_type == :REAL end |