+++ /dev/null
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * wrapper/time.h
- *
- * Copyright (C) 2020 Michael Jeanson <mjeanson@efficios.com>
- * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_WRAPPER_TIME_H
-#define _LTTNG_WRAPPER_TIME_H
-
-#include <lttng/kernel-version.h>
-
-/*
- * Use 64bit timespec on kernels that have it, this makes 32bit arch
- * y2038 compliant.
- */
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,17,0))
-# define LTTNG_KERNEL_HAS_TIMESPEC64
-#endif
-
-#endif /* _LTTNG_WRAPPER_TIME_H */
#include <lttng/utils.h>
#include <ringbuffer/backend.h>
#include <ringbuffer/frontend.h>
-#include <wrapper/time.h>
#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0))
#include <linux/stdarg.h>
uint64_t tcf = trace_clock_freq();
int64_t offset;
unsigned long flags;
-#ifdef LTTNG_KERNEL_HAS_TIMESPEC64
struct timespec64 rts = { 0, 0 };
-#else
- struct timespec rts = { 0, 0 };
-#endif
/* Disable interrupts to increase correlation precision. */
local_irq_save(flags);
monotonic[0] = trace_clock_read64();
-#ifdef LTTNG_KERNEL_HAS_TIMESPEC64
ktime_get_real_ts64(&rts);
-#else
- getnstimeofday(&rts);
-#endif
monotonic[1] = trace_clock_read64();
local_irq_restore(flags);