2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
25 #define TIME_START(_timeDescription) \
29 char *timeDescription; \
30 unsigned int vm, vm1; \
35 NSAutoreleasePool *p__1; \
36 p__1 = [NSAutoreleasePool new]; \
37 vm = [[NSProcessInfo processInfo] virtualMemorySize]; \
40 timeDescription = _timeDescription; \
41 gettimeofday(&tv, NULL); \
42 ti = (double)tv.tv_sec + ((double)tv.tv_usec / 1000000.0 ); \
43 fprintf(stderr, "{"); \
46 #define TIME_END gettimeofday(&tv, NULL); \
47 gettimeofday(&tv, NULL); \
49 NSAutoreleasePool *p__1 = [NSAutoreleasePool new]; \
50 vm1 = [[NSProcessInfo processInfo] virtualMemorySize]; \
53 ti = (double)tv.tv_sec + ((double)tv.tv_usec / 1000000.0) - ti; \
55 "}%s: <%s> : time needed: %4.4fs memory wasted %d absolut"\
56 " %d\n", __PRETTY_FUNCTION__, timeDescription, \
57 ti < 0.0 ? -1.0 : ti, vm1 - vm, vm1); \
62 #define TIME_START(_timeDescription)