Changes in directory llvm-test/MultiSource/Applications/JM/ldecod:
image.c updated: 1.5 -> 1.6 --- Log message: Improve BSD ftime hack and apply it to another test. --- Diffs of the changes: (+12 -17) image.c | 29 ++++++++++++----------------- 1 files changed, 12 insertions(+), 17 deletions(-) Index: llvm-test/MultiSource/Applications/JM/ldecod/image.c diff -u llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.5 llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.6 --- llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.5 Thu Mar 29 01:21:07 2007 +++ llvm-test/MultiSource/Applications/JM/ldecod/image.c Thu Mar 29 11:27:28 2007 @@ -65,6 +65,16 @@ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) #include <sys/time.h> +int ftime(struct timeb *tp) +{ + struct timeval tv; + struct timezone tz; + gettimeofday(&tv, &tz); + tp->time = tv.tv_sec; + tp->millitm = tv.tv_usec / 1000; + tp->timezone = tz.tz_minuteswest; + tp->dstflag = tz.tz_dsttime; +} #endif #include "erc_api.h" @@ -86,21 +96,6 @@ OldSliceParams old_slice; -void ftime_hack(struct timeb *tp) -{ -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) - struct timeval tv; - struct timezone tz; - gettimeofday(&tv, &tz); - tp->time = tv.tv_sec; - tp->millitm = tv.tv_usec / 1000; - tp->timezone = tz.tz_minuteswest; - tp->dstflag = tz.tz_dsttime; -#else - ftime(tp); -#endif -} - void MbAffPostProc() { imgpel temp[16][32]; @@ -1308,7 +1303,7 @@ #ifdef WIN32 _ftime (&(img->tstruct_start)); // start time ms #else - ftime_hack (&(img->tstruct_start)); // start time ms + ftime (&(img->tstruct_start)); // start time ms #endif time( &(img->ltime_start)); // start time s } @@ -1532,7 +1527,7 @@ #ifdef WIN32 _ftime (&(img->tstruct_end)); // start time ms #else - ftime_hack (&(img->tstruct_end)); // start time ms + ftime (&(img->tstruct_end)); // start time ms #endif time( &(img->ltime_end)); // start time s _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits