X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust-ctl%2Fustctl.c;h=11fc70446ea5ac015d0d9e613df73c1aef785ad8;hb=fca361e81cbb39f076182e9d2c6dd2c4c8c25b5d;hp=7830132b8c41d08c295bc2dc10cee41faf3940da;hpb=b2f3252a48dfe0a2bac5b307157bcf2b25d044b3;p=lttng-ust.git diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index 7830132b..11fc7044 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -1571,6 +1571,21 @@ int ustctl_get_stream_id(struct ustctl_consumer_stream *stream, return client_cb->stream_id(buf, handle, stream_id); } +int ustctl_get_current_timestamp(struct ustctl_consumer_stream *stream, + uint64_t *ts) +{ + struct lttng_ust_client_lib_ring_buffer_client_cb *client_cb; + struct lttng_ust_lib_ring_buffer *buf = stream->buf; + struct lttng_ust_shm_handle *handle = stream->chan->chan->handle; + + if (!stream || !ts) + return -EINVAL; + client_cb = get_client_cb(buf, handle); + if (!client_cb || !client_cb->current_timestamp) + return -ENOSYS; + return client_cb->current_timestamp(buf, handle, ts); +} + /* * Returns 0 on success, negative error value on error. */