File: timer.h

package info (click to toggle)
qd 2.1.200-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,932 kB
  • ctags: 1,396
  • sloc: sh: 9,033; cpp: 5,696; f90: 5,156; ansic: 1,359; makefile: 98
file content (30 lines) | stat: -rw-r--r-- 618 bytes parent folder | download
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
/*
 * tests/timer.h
 *
 * This work was supported by the Director, Office of Science, Division
 * of Mathematical, Information, and Computational Sciences of the
 * U.S. Department of Energy under contract number DE-AC03-76SF00098.
 *
 * Copyright (c) 2000-2001
 *
 * Contains function used for timing.
 */

#ifndef _TIMER_H_
#define _TIMER_H_

#include "config.h"

#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
typedef struct timeval TimeVal;
#else
#include <ctime>
typedef time_t TimeVal;
#endif

void   tic(TimeVal *tv);   /* start timing. */
double toc(TimeVal *tv);   /* stop  timing. */

#endif  /* _TIMER_H_ */