COIN-OR::LEMON - Graph Library

Changeset 562:b9b3473327e3 in lemon for lemon/time_measure.h


Ignore:
Timestamp:
02/16/09 19:15:52 (16 years ago)
Author:
Alpar Juttner <alpar@…>
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
Message:

Merge

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/time_measure.h

    r511 r562  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • lemon/time_measure.h

    r556 r562  
    2525
    2626#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>
    3528#else
    3629#include <unistd.h>
     
    9386      cstime=ts.tms_cstime/tck;
    9487#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);
    11589#endif
    11690    }
Note: See TracChangeset for help on using the changeset viewer.