/usr/include/ladr/clock.h is in libladr-dev 0.0.200911a-2.1+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 | /* Copyright (C) 2006, 2007 William McCune
This file is part of the LADR Deduction Library.
The LADR Deduction Library is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License,
version 2.
The LADR Deduction Library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with the LADR Deduction Library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef TP_CLOCK_H
#define TP_CLOCK_H
#include <time.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "string.h"
/* INTRODUCTION
This package is for timing various operations. Say you need to time
an operation P. You first call clock_init() to set up a clock,
then you can start and stop the clock as you wish, then you
can get the accumulated time with clock_value().
These clocks measure the user CPU time.
<P>
An unusual feature of these clocks is that they can be used
inside of recursive routines. For example, you can start
the clock at the beginning of a recursive routine and stop
it at the end. If you start it 3 times then stop it
three times, it will really stop only on the third call.
This works by a counter of the number of extra
times the clock has been started, and clock_stop() will stop
the clock only when the count is 0. (This feature probably isn't
very useful, and most people can ignore it.)
<P>
Also here are some routines for getting process system/user CPU time,
elapsed wall-clock time, and the time/date.
*/
/* Public definitions */
typedef struct clock * Clock;
/* End of public definitions */
/* Public function prototypes from clock.c */
void free_clock(Clock p);
Clock clock_init(char *str);
void clock_start(Clock p);
void clock_stop(Clock p);
unsigned clock_milliseconds(Clock p);
double clock_seconds(Clock p);
BOOL clock_running(Clock p);
void clock_reset(Clock p);
void fprint_clock(FILE *fp, Clock p);
char * get_date(void);
unsigned user_time();
double user_seconds();
unsigned system_time();
double system_seconds();
unsigned absolute_wallclock(void);
void init_wallclock();
unsigned wallclock();
void disable_clocks(void);
void enable_clocks(void);
BOOL clocks_enabled(void);
#endif /* conditional compilation of whole file */
|