source:
installer/lib/wrapper/macosx/wrapper_unix.c.diff
@
d6c3ffd
Last change on this file since d6c3ffd was d6c3ffd, checked in by , 15 years ago | |
---|---|
|
|
File size: 1.5 KB |
-
src/c/wrapper_unix.c
old new 309 309 #include <limits.h> 310 310 #include <pthread.h> 311 311 #include <pwd.h> 312 313 #ifdef MACOSX 314 #include <sys/time.h> 315 #else 312 316 #include <sys/timeb.h> 317 #endif 318 313 319 #include <sys/types.h> 314 320 #include <sys/stat.h> 315 321 #include <sys/wait.h> … … 1056 1062 ssize_t bytesRead; 1057 1063 char readBuf [1025]; 1058 1064 int readBufPos, childOutputBufferPos; 1065 #ifdef MACOSX 1066 struct timeval timeBuffer; 1067 #else 1059 1068 struct timeb timeBuffer; 1069 #endif 1060 1070 long startTime; 1061 1071 int startTimeMillis; 1062 1072 long now; … … 1064 1074 long durr; 1065 1075 1066 1076 if (jvmOut != -1) { 1077 #ifdef MACOSX 1078 gettimeofday(&timeBuffer, NULL); 1079 startTime = now = timeBuffer.tv_sec; 1080 startTimeMillis = nowMillis = timeBuffer.tv_usec / 1000; 1081 #else 1067 1082 ftime( &timeBuffer ); 1068 1083 startTime = now = timeBuffer.time; 1069 1084 startTimeMillis = nowMillis = timeBuffer.millitm; 1085 #endif 1070 1086 1071 1087 /* 1072 1088 log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "now=%ld, nowMillis=%d", now, nowMillis); … … 1159 1175 } 1160 1176 1161 1177 /* Get the time again */ 1178 #ifdef MACOSX 1179 gettimeofday(&timeBuffer, NULL); 1180 now = timeBuffer.tv_sec; 1181 nowMillis = timeBuffer.tv_usec / 1000; 1182 #else 1162 1183 ftime( &timeBuffer ); 1163 1184 now = timeBuffer.time; 1164 1185 nowMillis = timeBuffer.millitm; 1186 #endif 1165 1187 } 1166 1188 } 1167 1189
Note: See TracBrowser
for help on using the repository browser.