Babeltrace 2 C API  2.1.1
Open-source trace manipulation framework
clock-snapshot.h
1 /*
2  * SPDX-License-Identifier: MIT
3  *
4  * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5  */
6 
7 #ifndef BABELTRACE2_TRACE_IR_CLOCK_SNAPSHOT_H
8 #define BABELTRACE2_TRACE_IR_CLOCK_SNAPSHOT_H
9 
10 /* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11 
12 #ifndef __BT_IN_BABELTRACE_H
13 # error "Please include <babeltrace2/babeltrace.h> instead."
14 #endif
15 
16 #include <stdint.h>
17 
18 #include <babeltrace2/types.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
110  const bt_clock_snapshot *clock_snapshot) __BT_NOEXCEPT;
111 
129 extern uint64_t bt_clock_snapshot_get_value(
130  const bt_clock_snapshot *clock_snapshot) __BT_NOEXCEPT;
131 
142 
149 
205  const bt_clock_snapshot *clock_snapshot,
206  int64_t *ns_from_origin) __BT_NOEXCEPT;
207 
210 #ifdef __cplusplus
211 }
212 #endif
213 
214 #endif /* BABELTRACE2_TRACE_IR_CLOCK_SNAPSHOT_H */
bt_clock_snapshot_get_ns_from_origin_status bt_clock_snapshot_get_ns_from_origin(const bt_clock_snapshot *clock_snapshot, int64_t *ns_from_origin)
Converts the value of the clock snapshot clock_snapshot from cycles to nanoseconds from the origin of...
bt_clock_snapshot_get_ns_from_origin_status
Status codes for bt_clock_snapshot_get_ns_from_origin().
Definition: clock-snapshot.h:136
Success.
Definition: clock-snapshot.h:141
struct bt_clock_snapshot bt_clock_snapshot
Clock snapshot.
Definition: types.h:23
Integer overflow while computing the result.
Definition: clock-snapshot.h:147
const bt_clock_class * bt_clock_snapshot_borrow_clock_class_const(const bt_clock_snapshot *clock_snapshot)
Borrows the class of the clock of which clock_snapshot is a snapshot.
uint64_t bt_clock_snapshot_get_value(const bt_clock_snapshot *clock_snapshot)
Returns the value, in clock cycles, of the clock snapshot clock_snapshot.
struct bt_clock_class bt_clock_class
Clock class.
Definition: types.h:22