BRL-CAD
timer.h
Go to the documentation of this file.
1/* T I M E R . H
2 * BRL-CAD
3 *
4 * Copyright (c) 1993-2023 United States Government as represented by
5 * the U.S. Army Research Laboratory.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * version 2.1 as published by the Free Software Foundation.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this file; see the file named COPYING for more
18 * information.
19 */
20/** @file rt/timer.h */
21
22#ifndef RT_TIMER_H
23#define RT_TIMER_H
24
25#include "common.h"
26#include "vmath.h"
27#include "bu/vls.h"
28#include "rt/defines.h"
29
30__BEGIN_DECLS
31
32/* Start the global timer */
33/** @addtogroup rt_timer */
34/** @{ */
35/**
36 * Provide timing information for RT.
37 */
38
39/**
40 * Initialize global librt timer
41 */
42RT_EXPORT extern void rt_prep_timer(void);
43
44/**
45 * Reports on the passage of time, since rt_prep_timer() was called. Explicit
46 * return is number of CPU seconds. String return is descriptive. If "wall"
47 * pointer is non-null, number of elapsed seconds per the wall clock are
48 * returned. Times returned will never be zero.
49 */
50RT_EXPORT extern double rt_get_timer(struct bu_vls *vp, double *elapsed);
51/* Return CPU time, text, & wall clock time off the global timer */
52
53/**
54 * Compatibility routine
55 */
56RT_EXPORT extern double rt_read_timer(char *str, int len);
57
58/** @} */
59
60__END_DECLS
61
62#endif /* RT_TIMER_H */
63
64/*
65 * Local Variables:
66 * tab-width: 8
67 * mode: C
68 * indent-tabs-mode: t
69 * c-file-style: "stroustrup"
70 * End:
71 * ex: shiftwidth=4 tabstop=8
72 */
Header file for the BRL-CAD common definitions.
double rt_read_timer(char *str, int len)
double rt_get_timer(struct bu_vls *vp, double *elapsed)
void rt_prep_timer(void)
Definition: vls.h:53
fundamental vector, matrix, quaternion math macros