Changeset 787 for trunk/dll/error.c
- Timestamp:
- Aug 19, 2007, 11:02:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/error.c
r689 r787 25 25 20 Apr 07 SHL Correct IDS_GENERR1TEXT formatting 26 26 23 Apr 07 SHL Add Win_Error_NoMsgBox. Rework others 27 14 Aug 07 SHL Add GetMSecTimer 28 14 Aug 07 SHL Use GetMSecTimer in DbgMsg 27 29 28 30 ***********************************************************************/ … … 42 44 43 45 #pragma data_seg(DATA1) 44 #pragma alloc_text(FMINPUT,Win_Error,Dos_Error,saymsg,showMsg) 46 47 static PSZ pszSrcFile = __FILE__; 45 48 46 49 static VOID formatWinError(PSZ pszBuf, UINT cBufBytes, HWND hwndErr, HWND hwndOwner, … … 55 58 { 56 59 va_list va; 60 61 #if 1 // fixme to be selectable 62 63 static ULONG ul1stMSec; 64 // static ULONG ulLastMSec; 65 66 ULONG msec = GetMSecTimer(); 67 ULONG delta; 68 69 if (!ul1stMSec) { 70 ul1stMSec = msec; 71 // ulLastMSec = msec; // Avoid big delta 1st time 72 } 73 74 delta = msec - ul1stMSec; 75 // ulLastMSec = msec; 76 fprintf(stderr, "%03lu.%03lu ", delta / 1000, delta % 1000); 77 78 #endif 57 79 58 80 // OK for source file name to be null … … 227 249 } // formatWinError 228 250 251 /** 252 * Return millisecond timer value 253 * Resolution is milliseconds, but accuracy will be less 254 * depending on systems settings 255 */ 256 257 ULONG GetMSecTimer(void) 258 { 259 ULONG msec; 260 261 APIRET rc = DosQuerySysInfo(QSV_MS_COUNT, QSV_MS_COUNT, 262 &msec, sizeof(msec)); 263 if (rc) { 264 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 265 "DosQuerySysInfo"); 266 msec = 0; 267 } 268 return msec; 269 } 270 229 271 //== Runtime_Error: report runtime library error using passed message string === 230 272 … … 363 405 364 406 } // Win_Error_NoMsgBox 407 408 #pragma alloc_text(ERROR,Win_Error,Dos_Error,saymsg,showMsg,GetHiresTimeer)
Note:
See TracChangeset
for help on using the changeset viewer.