This file is indexed.

/usr/include/litl_timer.h is in liblitl-dev 0.1.8-2+b2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
/* -*- c-file-style: "GNU" -*- */
/*
 * Copyright © Télécom SudParis.
 * See COPYING in top-level directory.
 */

#ifndef LITL_TIMER_H_
#define LITL_TIMER_H_

/**
 *  \file litl_timer.h
 *  \brief litl_timer Provides a set of functions for measuring time
 *
 *  \authors
 *    Developers are : \n
 *        Roman Iakymchuk   -- roman.iakymchuk@telecom-sudparis.eu \n
 *        Francois Trahay   -- francois.trahay@telecom-sudparis.eu \n
 */

#include "litl_types.h"

/**
 * \defgroup litl_timer LiTL Timing Methods
 */

/**
 * \defgroup litl_timer_init Initialization Functions
 * \ingroup litl_timer
 */

/**
 * \defgroup litl_timer_measure Pre-Defined Timing Methods
 * \ingroup litl_timer
 */

/**
 * \ingroup litl_timer_init
 * \brief A callback function that returns the current time in ns. It can be
 * either a pointer to one of the timing functions provided by LiTL or a
 * user-defined function
 */
typedef litl_time_t (*litl_timing_method_t)();

/**
 * \ingroup litl_timer_measure
 * \brief Calls the selected timing method and get the current time in ns
 */
extern litl_timing_method_t litl_get_time;

/**
 * \ingroup litl_timer_init
 * \brief Initializes the timing mechanism
 */
void litl_time_initialize();

/**
 * \ingroup litl_timer_init
 * \brief Selects the timing function to use
 * \param callback A name of timing function
 * \return Returns -1 if an error occurs. Otherwise, returns 0
 */
int litl_set_timing_method(litl_timing_method_t callback);

// Pre-defined timing methods:

/**
 * \ingroup litl_timer_measure
 * \brief Uses clock_gettime(CLOCK_MONOTONIC_RAW)
 * \return Returns time that is similar to CLOCK_MONOTONIC, but provides access
 *  to a raw hardware-based time
 */
litl_time_t litl_get_time_monotonic_raw();

/**
 * \ingroup litl_timer_measure
 * \brief Uses clock_gettime(CLOCK_MONOTONIC)
 * \return Returns the monotonic time since some unspecified starting point
 */
litl_time_t litl_get_time_monotonic();

/**
 * \ingroup litl_timer_measure
 * \brief Uses clock_gettime(CLOCK_REALTIME)
 * \return Returns the real (wall-clock) time
 */
litl_time_t litl_get_time_realtime();

/**
 * \ingroup litl_timer_measure
 * \brief Uses clock_gettime(CLOCK_PROCESS_CPUTIME)
 * \return Returns the high-resolution per-process time from the CPU
 */
litl_time_t litl_get_time_process_cputime();

/**
 * \ingroup litl_timer_measure
 * \brief Uses clock_gettime(CLOCK_THREAD_CPUTIME)
 * \return Returns the thread-specific CPU-time
 */
litl_time_t litl_get_time_thread_cputime();

/**
 * \ingroup litl_timer_measure
 * \brief Uses CPU-specific register (for instance, rdtsc for X86* processors)
 * \return Returns the measured time in clock cycles
 */
litl_time_t litl_get_time_ticks();

#endif /* LITL_TIMER_H_ */