Version 0.1
00001 /* bctimer.h 00002 $Revision: 238 $ $Date: 2006-04-19 18:42:33 -0700 (Wed, 19 Apr 2006) $ 00003 00004 ---------------------------------------------------------------------- 00005 This file is part of BCLS (Bound-Constrained Least Squares). 00006 00007 Copyright (C) 2006 Michael P. Friedlander, Department of Computer 00008 Science, University of British Columbia, Canada. All rights 00009 reserved. E-mail: <mpf@cs.ubc.ca>. 00010 00011 BCLS is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU Lesser General Public License as 00013 published by the Free Software Foundation; either version 2.1 of the 00014 License, or (at your option) any later version. 00015 00016 BCLS is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00018 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General 00019 Public License for more details. 00020 00021 You should have received a copy of the GNU Lesser General Public 00022 License along with BCLS; if not, write to the Free Software 00023 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00024 USA 00025 ---------------------------------------------------------------------- 00026 */ 00032 #ifndef _BCLSTIMER_H 00033 #define _BCLSTIMER_H 00034 00035 #ifdef HAVE_CONFIG_H 00036 #include <config.h> 00037 #endif 00038 00039 #ifdef HAVE_GETRUSAGE 00040 #include <sys/time.h> 00041 #include <sys/resource.h> 00042 #else 00043 #include <time.h> 00044 #endif 00045 00046 /* BCLS Timer */ 00047 typedef struct BCLS_timer BCLS_timer; 00048 struct BCLS_timer { 00049 double start; 00050 double total; 00051 int nStarts; 00052 char *name; 00053 }; 00054 00055 /* Measure elapsed time between calls. */ 00056 #define BCLS_TIMER_INIT -1 00057 #define BCLS_TIMER_START 0 00058 #define BCLS_TIMER_STOP 1 00059 #define BCLS_TIMER_PRINT 2 00060 double bcls_timer( BCLS_timer *timer, int task ); 00061 00062 #endif
Generated on Sun Mar 4 22:50:03 2007 by Doxygen 1.5.1