Fresco/Prague/src/Sys Stopwatch.cc,1.7,1.8
Tobias Hunger <[email protected]> Sun, 03 Aug 2003 16:55:33 -0500
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/Prague/src/Sys
In directory purcel:/tmp/cvs-serv22803/Sys
Modified Files:
Stopwatch.cc
Log Message:
Don't mix the ANSI C and the POSIX way of getting ticks: They may differ.
Changed the code to be all POSIX.
Index: Stopwatch.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Prague/src/Sys/Stopwatch.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Stopwatch.cc 31 Mar 2001 09:37:10 -0000 1.7
+++ Stopwatch.cc 3 Aug 2003 21:55:30 -0000 1.8
@@ -23,7 +23,6 @@
#include <iostream>
#include <sys/times.h>
-#include <stdio.h>
#include <unistd.h>
using namespace Prague;
@@ -33,7 +32,7 @@
Stopwatch::Stopwatch()
: _state(undef)
{
- if (!_ticks) _ticks = CLOCKS_PER_SEC;
+ if (!_ticks) _ticks = sysconf(_SC_CLK_TCK);
start();
};