comparison clustalomega/clustal-omega-0.2.0/src/squid/stopwatch.h @ 0:ff1768533a07

Migrated tool version 0.2 from old tool shed archive to new tool shed repository
author clustalomega
date Tue, 07 Jun 2011 17:04:25 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ff1768533a07
1 /* stopwatch.h
2 * SRE, Fri Nov 26 14:54:21 1999 [St. Louis] [HMMER]
3 * SRE, Thu Aug 3 08:00:35 2000 [St. Louis] [moved to SQUID]
4 * CVS $Id: stopwatch.h,v 1.2 2000/08/03 22:24:38 eddy Exp)
5 *
6 * Header file for stopwatch.c module:
7 * reporting of cpu/system/elapsed time used by a process.
8 * See stopwatch.c comments for documentation of compile-time
9 * configuration options and API.
10 *
11 *****************************************************************
12 * SQUID - a library of functions for biological sequence analysis
13 * Copyright (C) 1992-2002 Washington University School of Medicine
14 *
15 * This source code is freely distributed under the terms of the
16 * GNU General Public License. See the files COPYRIGHT and LICENSE
17 * for details.
18 *****************************************************************
19 */
20 #include <stdio.h>
21 #include <time.h>
22 #ifndef SRE_STRICT_ANSI
23 #include <sys/times.h>
24 #endif
25
26 #ifndef STOPWATCH_H_INCLUDED
27 #define STOPWATCH_H_INCLUDED
28
29 struct stopwatch_s {
30 time_t t0; /* Wall clock time, ANSI time() */
31 #ifdef SRE_STRICT_ANSI
32 clock_t cpu0; /* CPU time, ANSI clock() */
33 #else
34 struct tms cpu0; /* CPU/system time, POSIX times()*/
35 #endif
36
37 double elapsed; /* elapsed time, seconds */
38 double user; /* CPU time, seconds */
39 double sys; /* system time, seconds */
40 };
41 typedef struct stopwatch_s Stopwatch_t;
42
43 extern void StopwatchStart(Stopwatch_t *w);
44 extern void StopwatchStop(Stopwatch_t *w);
45 extern void StopwatchInclude(Stopwatch_t *w1, Stopwatch_t *w2);
46 extern Stopwatch_t *StopwatchCreate(void);
47 extern void StopwatchZero(Stopwatch_t *w);
48 extern void StopwatchCopy(Stopwatch_t *w1, Stopwatch_t *w2);
49 extern void StopwatchFree(Stopwatch_t *w);
50 extern void StopwatchDisplay(FILE *fp, char *s, Stopwatch_t *w);
51
52 #ifdef HMMER_PVM
53 extern void StopwatchPVMPack(Stopwatch_t *w);
54 extern void StopwatchPVMUnpack(Stopwatch_t *w);
55 #endif
56
57 #endif /*STOPWATCH_H_INCLUDED*/
58