diff options
Diffstat (limited to 'multimedia/jahshaka/files/patch-jah_libraries_jahtimer_jahtimer.cpp')
-rw-r--r-- | multimedia/jahshaka/files/patch-jah_libraries_jahtimer_jahtimer.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/multimedia/jahshaka/files/patch-jah_libraries_jahtimer_jahtimer.cpp b/multimedia/jahshaka/files/patch-jah_libraries_jahtimer_jahtimer.cpp new file mode 100644 index 000000000000..9c86f21c1ce2 --- /dev/null +++ b/multimedia/jahshaka/files/patch-jah_libraries_jahtimer_jahtimer.cpp @@ -0,0 +1,31 @@ +--- 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; + } + |