1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00
freebsd-ports/multimedia/jahshaka/files/patch-jah_libraries_jahtimer_jahtimer.cpp
Pav Lucistnik 206ef322e1 Jahshaka is a video and film compositing, editing and special fx system
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>
2005-09-18 18:20:48 +00:00

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(&current_time);
- start_time = (int)current_time.millitm;
+struct timezone tz;
- start_time_float = (double)current_time.time + ((double)current_time.millitm / 1000.0);
+ gettimeofday(&current_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(&current_time);
- end_time = (int)current_time.millitm;
- end_time_float = (double)current_time.time + ((double)current_time.millitm / 1000.0);
+struct timezone tz;
+
+ gettimeofday(&current_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;
}