3131/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
3232
3333#include <assert.h>
34- #if defined( _WIN32 ) || defined( _WIN64 )
34+ #ifdef _WIN32
3535#include <windows.h>
3636#else
3737#include <sys/times.h>
@@ -56,7 +56,7 @@ SCIP_Real cputime2sec(
5656{
5757 clock_t clocks_per_second ;
5858
59- #if defined( _WIN32 ) || defined( _WIN64 )
59+ #ifdef _WIN32
6060 clocks_per_second = 100 ;
6161#else
6262#ifndef CLK_TCK
@@ -93,7 +93,7 @@ void sec2cputime(
9393
9494 assert (cputime != NULL );
9595
96- #if defined( _WIN32 ) || defined( _WIN64 )
96+ #ifdef _WIN32
9797 clocks_per_second = 100 ;
9898#else
9999#ifndef CLK_TCK
@@ -301,7 +301,7 @@ void SCIPclockStart(
301301
302302 if ( clck -> nruns == 0 )
303303 {
304- #if defined( _WIN32 ) || defined( _WIN64 )
304+ #ifdef _WIN32
305305 FILETIME creationtime ;
306306 FILETIME exittime ;
307307 FILETIME kerneltime ;
@@ -316,7 +316,7 @@ void SCIPclockStart(
316316 switch ( clck -> clocktype )
317317 {
318318 case SCIP_CLOCKTYPE_CPU :
319- #if defined( _WIN32 ) || defined( _WIN64 )
319+ #ifdef _WIN32
320320 GetProcessTimes (GetCurrentProcess (), & creationtime , & exittime , & kerneltime , & usertime );
321321 clck -> data .cpuclock .user -= usertime .dwHighDateTime * 42950 + usertime .dwLowDateTime / 100000L ;
322322#else
@@ -327,7 +327,7 @@ void SCIPclockStart(
327327 break ;
328328
329329 case SCIP_CLOCKTYPE_WALL :
330- #if defined( _WIN32 ) || defined( _WIN64 )
330+ #ifdef _WIN32
331331 clck -> data .wallclock .sec -= time (NULL );
332332#else
333333 gettimeofday (& tp , NULL );
@@ -372,7 +372,7 @@ void SCIPclockStop(
372372 clck -> nruns -- ;
373373 if ( clck -> nruns == 0 )
374374 {
375- #if defined( _WIN32 ) || defined( _WIN64 )
375+ #ifdef _WIN32
376376 FILETIME creationtime ;
377377 FILETIME exittime ;
378378 FILETIME kerneltime ;
@@ -387,7 +387,7 @@ void SCIPclockStop(
387387 switch ( clck -> clocktype )
388388 {
389389 case SCIP_CLOCKTYPE_CPU :
390- #if defined( _WIN32 ) || defined( _WIN64 )
390+ #ifdef _WIN32
391391 GetProcessTimes (GetCurrentProcess (), & creationtime , & exittime , & kerneltime , & usertime );
392392 clck -> data .cpuclock .user += usertime .dwHighDateTime * 42950 + usertime .dwLowDateTime / 100000L ;
393393#else
@@ -397,7 +397,7 @@ void SCIPclockStop(
397397 break ;
398398
399399 case SCIP_CLOCKTYPE_WALL :
400- #if defined( _WIN32 ) || defined( _WIN64 )
400+ #ifdef _WIN32
401401 clck -> data .wallclock .sec += time (NULL );
402402#else
403403 gettimeofday (& tp , NULL );
@@ -471,7 +471,7 @@ SCIP_Real SCIPclockGetTime(
471471 }
472472 else
473473 {
474- #if defined( _WIN32 ) || defined( _WIN64 )
474+ #ifdef _WIN32
475475 FILETIME creationtime ;
476476 FILETIME exittime ;
477477 FILETIME kerneltime ;
@@ -485,7 +485,7 @@ SCIP_Real SCIPclockGetTime(
485485 switch ( clck -> clocktype )
486486 {
487487 case SCIP_CLOCKTYPE_CPU :
488- #if defined( _WIN32 ) || defined( _WIN64 )
488+ #ifdef _WIN32
489489 GetProcessTimes (GetCurrentProcess (), & creationtime , & exittime , & kerneltime , & usertime );
490490 result = cputime2sec (clck -> data .cpuclock .user + usertime .dwHighDateTime * 42950 + usertime .dwLowDateTime / 100000L );
491491#else
@@ -494,7 +494,7 @@ SCIP_Real SCIPclockGetTime(
494494#endif
495495 break ;
496496 case SCIP_CLOCKTYPE_WALL :
497- #if defined( _WIN32 ) || defined( _WIN64 )
497+ #ifdef _WIN32
498498 result = walltime2sec (clck -> data .wallclock .sec + time (NULL ), 0 );
499499#else
500500 gettimeofday (& tp , NULL );
@@ -568,7 +568,7 @@ void SCIPclockSetTime(
568568
569569 if ( clck -> nruns >= 1 )
570570 {
571- #if defined( _WIN32 ) || defined( _WIN64 )
571+ #ifdef _WIN32
572572 FILETIME creationtime ;
573573 FILETIME exittime ;
574574 FILETIME kerneltime ;
@@ -582,7 +582,7 @@ void SCIPclockSetTime(
582582 switch ( clck -> clocktype )
583583 {
584584 case SCIP_CLOCKTYPE_CPU :
585- #if defined( _WIN32 ) || defined( _WIN64 )
585+ #ifdef _WIN32
586586 GetProcessTimes (GetCurrentProcess (), & creationtime , & exittime , & kerneltime , & usertime );
587587 clck -> data .cpuclock .user -= usertime .dwHighDateTime * 42950 + usertime .dwLowDateTime / 100000L ;
588588#else
@@ -592,7 +592,7 @@ void SCIPclockSetTime(
592592 break ;
593593
594594 case SCIP_CLOCKTYPE_WALL :
595- #if defined( _WIN32 ) || defined( _WIN64 )
595+ #ifdef _WIN32
596596 clck -> data .wallclock .sec -= time (NULL );
597597#else
598598 gettimeofday (& tp , NULL );
@@ -622,7 +622,7 @@ SCIP_Real SCIPclockGetTimeOfDay(
622622 void
623623 )
624624{
625- #if defined( _WIN32 ) || defined( _WIN64 )
625+ #ifdef _WIN32
626626 time_t now ;
627627 now = time (NULL );
628628 return (SCIP_Real )(now % (24 * 3600 ));
0 commit comments