File: timer.h

package info (click to toggle)
inn2 2.4.5-5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,912 kB
  • ctags: 7,860
  • sloc: ansic: 85,104; perl: 11,427; sh: 9,863; makefile: 2,498; yacc: 1,563; python: 298; lex: 252; tcl: 7
file content (38 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (4)
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
/*  $Id: timer.h 6129 2003-01-19 00:39:49Z rra $
**
**  Timer library interface.
**
**  An interface to a simple profiling library.  An application can declare
**  its intent to use n timers by calling TMRinit(n), and then start and
**  stop numbered timers with TMRstart and TMRstop.  TMRsummary logs the
**  results to syslog given labels for each numbered timer.
*/

#ifndef INN_TIMER_H
#define INN_TIMER_H

#include <inn/defines.h>

BEGIN_DECLS

enum {
    TMR_HISHAVE,                /* Looking up ID in history (yes/no). */
    TMR_HISGREP,                /* Looking up ID in history (data). */
    TMR_HISWRITE,               /* Writing to history. */
    TMR_HISSYNC,                /* Syncing history to disk. */
    TMR_APPLICATION             /* Application numbering starts here. */
};

void            TMRinit(unsigned int);
void            TMRstart(unsigned int);
void            TMRstop(unsigned int);
void            TMRsummary(const char *prefix, const char *const *labels);
unsigned long   TMRnow(void);
void            TMRfree(void);

/* Return the current time as a double of seconds and fractional sections. */
double TMRnow_double(void);

END_DECLS

#endif /* INN_TIMER_H */