X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-client.h;h=2cdecbe9f6bfdd8cf670304b20b29cc06cdaa4f1;hb=86a4e97112c40b1ec823c60de8138d6bb55262fe;hp=46717135cd4cdf9536f3ff74a4cd4252a8c7e849;hpb=b2f3252a48dfe0a2bac5b307157bcf2b25d044b3;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index 46717135..2cdecbe9 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -470,6 +470,18 @@ static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf, return 0; } +static int client_current_timestamp(struct lttng_ust_lib_ring_buffer *buf, + struct lttng_ust_shm_handle *handle, + uint64_t *ts) +{ + struct channel *chan; + + chan = shmp(handle, handle->chan); + *ts = client_ring_buffer_clock_read(chan); + + return 0; +} + static const struct lttng_ust_client_lib_ring_buffer_client_cb client_cb = { .parent = { @@ -487,6 +499,7 @@ struct lttng_ust_client_lib_ring_buffer_client_cb client_cb = { .content_size = client_content_size, .packet_size = client_packet_size, .stream_id = client_stream_id, + .current_timestamp = client_current_timestamp, }; static const struct lttng_ust_lib_ring_buffer_config client_config = {