#include <common/kernel-ctl/kernel-ctl.h>
#include <common/kernel-consumer/kernel-consumer.h>
#include <common/consumer-stream.h>
#include "consumer-timer.h"
#include <common/kernel-ctl/kernel-ctl.h>
#include <common/kernel-consumer/kernel-consumer.h>
#include <common/consumer-stream.h>
#include "consumer-timer.h"
{
int ret;
struct ctf_packet_index index;
memset(&index, 0, sizeof(index));
{
int ret;
struct ctf_packet_index index;
memset(&index, 0, sizeof(index));
index.timestamp_end = htobe64(ts);
ret = consumer_stream_write_index(stream, &index);
if (ret < 0) {
index.timestamp_end = htobe64(ts);
ret = consumer_stream_write_index(stream, &index);
if (ret < 0) {