mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-10 07:04:03 +00:00
206ef322e1
that uses OpenGL & OpenML hardware rendering to give operators real time interactivity. The system is cross platform, and also includes full CG, paint and image processing modules. PR: ports/85838 Submitted by: Igor Pokrovsky <ip@doom.homeunix.org>
32 lines
986 B
C++
32 lines
986 B
C++
--- jah/libraries/jahtimer/jahtimer.cpp.orig
|
|
+++ jah/libraries/jahtimer/jahtimer.cpp
|
|
@@ -11,18 +11,22 @@
|
|
|
|
void JahTimer::starttime( void )
|
|
{
|
|
- ftime(¤t_time);
|
|
- start_time = (int)current_time.millitm;
|
|
+struct timezone tz;
|
|
|
|
- start_time_float = (double)current_time.time + ((double)current_time.millitm / 1000.0);
|
|
+ gettimeofday(¤t_time,&tz);
|
|
+ start_time = (int)current_time.tv_usec;
|
|
+
|
|
+ start_time_float = (double)current_time.tv_sec + ((double)current_time.tv_usec / 1000.0);
|
|
|
|
}
|
|
|
|
void JahTimer::endtime ( void )
|
|
{
|
|
- ftime(¤t_time);
|
|
- end_time = (int)current_time.millitm;
|
|
- end_time_float = (double)current_time.time + ((double)current_time.millitm / 1000.0);
|
|
+struct timezone tz;
|
|
+
|
|
+ gettimeofday(¤t_time,&tz);
|
|
+ end_time = (int)current_time.tv_usec;
|
|
+ end_time_float = (double)current_time.tv_sec + ((double)current_time.tv_usec / 1000.0);
|
|
total_time_float = end_time_float - start_time_float;
|
|
}
|
|
|