Skip to contentSkip to conversation

API cleanup name get_timestamp and get_cycles

PATCH New Julien Desfossez 2 participants 2 messages Aug 7, 2012 2 messages not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 API cleanup name get_timestamp and get_cycles

In reply to a message not in the archive

Rename bt_ctf_get_cycles_timestamp to bt_ctf_get_cycles, and bt_ctf_get_real_timestamp to bt_ctf_get_timestamp.

---
 formats/ctf/events.c            |    4 ++--
 include/babeltrace/ctf/events.h |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
formats/ctf/events.c +2 -2
index 06419a1..9693413 100644
@@ -281,7 +281,7 @@ int bt_ctf_event_get_handle_id(const struct bt_ctf_event *ctf_event)
 	return ret;
 }
 
-uint64_t bt_ctf_get_real_timestamp(const struct bt_ctf_event *ctf_event)
+uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *ctf_event)
 {
 	struct ctf_event_definition *event = ctf_event->parent;
 	if (event && event->stream->has_timestamp)
@@ -290,7 +290,7 @@ uint64_t bt_ctf_get_real_timestamp(const struct bt_ctf_event *ctf_event)
 		return -1ULL;
 }
 
-uint64_t bt_ctf_get_cycles_timestamp(const struct bt_ctf_event *ctf_event)
+uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *ctf_event)
 {
 	struct ctf_event_definition *event = ctf_event->parent;
 	if (event && event->stream->has_timestamp)
include/babeltrace/ctf/events.h +4 -4
index 419c4c8..4232feb 100644
@@ -90,16 +90,16 @@ const struct definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *e
 const char *bt_ctf_event_name(const struct bt_ctf_event *event);
 
 /*
- * bt_ctf_get_cycles_timestamp: returns the timestamp of the event as written
+ * bt_ctf_get_cycles: returns the timestamp of the event as written
  * in the packet (in cycles) or -1ULL on error.
  */
-uint64_t bt_ctf_get_cycles_timestamp(const struct bt_ctf_event *event);
+uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *event);
 
 /*
- * bt_ctf_get_real_timestamp: returns the timestamp of the event offsetted
+ * bt_ctf_get_timestamp: returns the timestamp of the event offsetted
  * with the system clock source (in ns) or -1ULL on error
  */
-uint64_t bt_ctf_get_real_timestamp(const struct bt_ctf_event *event);
+uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *event);
 
 /*
  * bt_ctf_get_field_list: set list pointer to an array of definition
Signature · 1 line
1.7.10.4
#3 lore raw
In reply to a message not in the archive
Quoted 2 lines · * Julien Desfossez ([email protected]) wrote:

Rename bt_ctf_get_cycles_timestamp to bt_ctf_get_cycles, and bt_ctf_get_real_timestamp to bt_ctf_get_timestamp.

merged, thanks!

Mathieu

Quoted 57 lines
---
 formats/ctf/events.c            |    4 ++--
 include/babeltrace/ctf/events.h |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)
formats/ctf/events.c +2 -2
index 06419a1..9693413 100644
@@ -281,7 +281,7 @@ int bt_ctf_event_get_handle_id(const struct bt_ctf_event *ctf_event)
 	return ret;
 }
 
-uint64_t bt_ctf_get_real_timestamp(const struct bt_ctf_event *ctf_event)
+uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *ctf_event)
 {
 	struct ctf_event_definition *event = ctf_event->parent;
 	if (event && event->stream->has_timestamp)
@@ -290,7 +290,7 @@ uint64_t bt_ctf_get_real_timestamp(const struct bt_ctf_event *ctf_event)
 		return -1ULL;
 }
 
-uint64_t bt_ctf_get_cycles_timestamp(const struct bt_ctf_event *ctf_event)
+uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *ctf_event)
 {
 	struct ctf_event_definition *event = ctf_event->parent;
 	if (event && event->stream->has_timestamp)
include/babeltrace/ctf/events.h +4 -4
index 419c4c8..4232feb 100644
@@ -90,16 +90,16 @@ const struct definition *bt_ctf_get_top_level_scope(const struct bt_ctf_event *e
 const char *bt_ctf_event_name(const struct bt_ctf_event *event);
 
 /*
- * bt_ctf_get_cycles_timestamp: returns the timestamp of the event as written
+ * bt_ctf_get_cycles: returns the timestamp of the event as written
  * in the packet (in cycles) or -1ULL on error.
  */
-uint64_t bt_ctf_get_cycles_timestamp(const struct bt_ctf_event *event);
+uint64_t bt_ctf_get_cycles(const struct bt_ctf_event *event);
 
 /*
- * bt_ctf_get_real_timestamp: returns the timestamp of the event offsetted
+ * bt_ctf_get_timestamp: returns the timestamp of the event offsetted
  * with the system clock source (in ns) or -1ULL on error
  */
-uint64_t bt_ctf_get_real_timestamp(const struct bt_ctf_event *event);
+uint64_t bt_ctf_get_timestamp(const struct bt_ctf_event *event);
 
 /*
  * bt_ctf_get_field_list: set list pointer to an array of definition
Signature · 1 line
1.7.10.4
Signature · 4 lines
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com