Main Page | Class List | File List | Class Members | File Members | Related Pages

stopwatch.h

Go to the documentation of this file.
00001 /* 00002 * $Id: stopwatch.h,v 1.13 2003/10/25 10:40:47 jasta Exp $ 00003 * 00004 * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net) 00005 * 00006 * This program is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU General Public License as published by the 00008 * Free Software Foundation; either version 2, or (at your option) any 00009 * later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, but 00012 * WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * General Public License for more details. 00015 */ 00016 00017 #ifndef __STOPWATCH_H 00018 #define __STOPWATCH_H 00019 00020 /*****************************************************************************/ 00021 00030 /*****************************************************************************/ 00031 00035 typedef struct 00036 { 00037 unsigned int active : 1; 00038 struct timeval start; 00039 struct timeval end; 00040 } StopWatch; 00041 00042 /*****************************************************************************/ 00043 00044 EXTERN_C_BEGIN 00045 00046 /*****************************************************************************/ 00047 00061 LIBGIFT_EXPORT 00062 void stopwatch_init (StopWatch *sw); 00063 00069 LIBGIFT_EXPORT 00070 void stopwatch_finish (StopWatch *sw); 00071 00077 LIBGIFT_EXPORT 00078 StopWatch *stopwatch_new (BOOL start); 00079 00084 LIBGIFT_EXPORT 00085 void stopwatch_free (StopWatch *sw); 00086 00092 LIBGIFT_EXPORT 00093 double stopwatch_free_elapsed (StopWatch *sw); 00094 00095 /*****************************************************************************/ 00096 00100 LIBGIFT_EXPORT 00101 void stopwatch_start (StopWatch *sw); 00102 00106 LIBGIFT_EXPORT 00107 void stopwatch_stop (StopWatch *sw); 00108 00118 LIBGIFT_EXPORT 00119 double stopwatch_elapsed (StopWatch *sw, unsigned long *msec); 00120 00121 /*****************************************************************************/ 00122 00123 EXTERN_C_END 00124 00125 /*****************************************************************************/ 00126 00127 #endif /* __STOPWATCH_H */

Generated on Sun Aug 22 08:07:10 2004 by doxygen 1.3.7