Changeset 562:b9b3473327e3 in lemon for lemon/time_measure.h
- Timestamp:
- 02/16/09 19:15:52 (16 years ago)
- Branch:
- default
- Parents:
- 561:2eb5c8ca2c91 (diff), 511:879c55700cd4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/time_measure.h
r511 r562 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-200 85 * Copyright (C) 2003-2009 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
lemon/time_measure.h
r556 r562 25 25 26 26 #ifdef WIN32 27 #ifndef WIN32_LEAN_AND_MEAN 28 #define WIN32_LEAN_AND_MEAN 29 #endif 30 #ifndef NOMINMAX 31 #define NOMINMAX 32 #endif 33 #include <windows.h> 34 #include <cmath> 27 #include <lemon/bits/windows.h> 35 28 #else 36 29 #include <unistd.h> … … 93 86 cstime=ts.tms_cstime/tck; 94 87 #else 95 static const double ch = 4294967296.0e-7; 96 static const double cl = 1.0e-7; 97 98 FILETIME system; 99 GetSystemTimeAsFileTime(&system); 100 rtime = ch * system.dwHighDateTime + cl * system.dwLowDateTime; 101 102 FILETIME create, exit, kernel, user; 103 if (GetProcessTimes(GetCurrentProcess(),&create, &exit, &kernel, &user)) { 104 utime = ch * user.dwHighDateTime + cl * user.dwLowDateTime; 105 stime = ch * kernel.dwHighDateTime + cl * kernel.dwLowDateTime; 106 cutime = 0; 107 cstime = 0; 108 } else { 109 rtime = 0; 110 utime = 0; 111 stime = 0; 112 cutime = 0; 113 cstime = 0; 114 } 88 bits::getWinProcTimes(rtime, utime, stime, cutime, cstime); 115 89 #endif 116 90 }
Note: See TracChangeset
for help on using the changeset viewer.