summaryrefslogtreecommitdiffstats
path: root/src/libavoid/timer.h
diff options
context:
space:
mode:
authorArcadie M. Cracan <acracan@gmail.com>2009-12-02 20:26:44 +0000
committerArcadie M. Cracan <acracan@gmail.com>2009-12-02 20:26:44 +0000
commit0cf189f9ab1ac334b55e9059ad3905bed9edffc6 (patch)
tree96b544140646b0f7e9784bda697821d72dabe4e6 /src/libavoid/timer.h
parentAll for windows: (diff)
downloadinkscape-0cf189f9ab1ac334b55e9059ad3905bed9edffc6.tar.gz
inkscape-0cf189f9ab1ac334b55e9059ad3905bed9edffc6.zip
Merge GSoC2009 Connectors into trunk
(bzr r8855)
Diffstat (limited to 'src/libavoid/timer.h')
-rw-r--r--src/libavoid/timer.h47
1 files changed, 28 insertions, 19 deletions
diff --git a/src/libavoid/timer.h b/src/libavoid/timer.h
index a7e6081fa..9cab6d7ff 100644
--- a/src/libavoid/timer.h
+++ b/src/libavoid/timer.h
@@ -2,24 +2,27 @@
* vim: ts=4 sw=4 et tw=0 wm=0
*
* libavoid - Fast, Incremental, Object-avoiding Line Router
- * Copyright (C) 2004-2006 Michael Wybrow <mjwybrow@users.sourceforge.net>
+ *
+ * Copyright (C) 2004-2008 Monash University
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
+ * See the file LICENSE.LGPL distributed with the library.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * library.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Author(s): Michael Wybrow <mjwybrow@users.sourceforge.net>
*/
+
#ifndef PROFILE_H
#define PROFILE_H
@@ -46,14 +49,20 @@ namespace Avoid {
typedef unsigned long long int bigclock_t;
-static const int tmCount = 5;
-
-static const int tmNon = -1;
-static const int tmAdd = 0;
-static const int tmDel = 1;
-static const int tmMov = 2;
-static const int tmPth = 3;
-static const int tmSev = 4;
+enum TimerIndex
+{
+ tmNon = 0,
+ tmAdd,
+ tmDel,
+ tmMov,
+ tmPth,
+ tmSev,
+ tmOrthogGraph,
+ tmOrthogRoute,
+ tmOrthogCentre,
+ tmOrthogNudge,
+ tmCount
+};
static const bool timerStart = true;
@@ -64,12 +73,12 @@ class Timer
{
public:
Timer();
- void Register(const int t, const bool start = timerDelay);
+ void Register(const TimerIndex t, const bool start = timerDelay);
void Start(void);
void Stop(void);
void Reset(void);
- void Print(const int t);
- void PrintAll(void);
+ void Print(TimerIndex, FILE *fp);
+ void PrintAll(FILE *fp);
private:
clock_t cStart[tmCount];
@@ -82,7 +91,7 @@ class Timer
bool running;
long count;
- int type, lasttype;
+ TimerIndex type, lasttype;
};