diff -c -r oommf12a3/pkg/nb/evoc.cc oommf/pkg/nb/evoc.cc *** oommf12a3/pkg/nb/evoc.cc Fri Oct 25 16:49:02 2002 --- oommf/pkg/nb/evoc.cc Mon Dec 9 16:39:42 2002 *************** *** 4,10 **** * * NOTICE: Please see the file ../../LICENSE * ! * Last modified on: $Date: 2002/10/25 20:49:02 $ * Last modified by: $Author: donahue $ */ --- 4,10 ---- * * NOTICE: Please see the file ../../LICENSE * ! * Last modified on: $Date: 2002/11/18 19:44:17 $ * Last modified by: $Author: donahue $ */ *************** *** 437,447 **** // smaller than the last then a wrap-around of 1 period is assumed. // This will not work properly if the time between calls to this // function is larger than the wrap-around period. For an 4-byte wide ! // clock_t with CLOCKS_PER_SECOND at 1024, the time to overflow is ! // about 48.5 days (Windows NT). With CLOCKS_PER_SECOND at 1000000 // overflow time is just over 71 minutes (Linux/x86). OTOH, an 8-byte // wide clock_t with a nanosecond tick rate takes over 584 years to ! // overflow. NOTE 1: Even though CLOCKS_PER_SECOND is 1e6 on // Linux/x86, the granularity of all user-accessible clocks appears to // be only 1/100 seconds (=1/CLK_TCK). On Linux/AXP, CLK_TCK is 1000 // (and clock_t is 8 bytes wide). NOTE 2: The wrap around periods are --- 437,447 ---- // smaller than the last then a wrap-around of 1 period is assumed. // This will not work properly if the time between calls to this // function is larger than the wrap-around period. For an 4-byte wide ! // clock_t with CLOCKS_PER_SEC at 1024, the time to overflow is ! // about 48.5 days (Windows NT). With CLOCKS_PER_SEC at 1000000 // overflow time is just over 71 minutes (Linux/x86). OTOH, an 8-byte // wide clock_t with a nanosecond tick rate takes over 584 years to ! // overflow. NOTE 1: Even though CLOCKS_PER_SEC is 1e6 on // Linux/x86, the granularity of all user-accessible clocks appears to // be only 1/100 seconds (=1/CLK_TCK). On Linux/AXP, CLK_TCK is 1000 // (and clock_t is 8 bytes wide). NOTE 2: The wrap around periods are *************** *** 467,474 **** ///// TEMPORARY MACROS, TO BE FIXED UP BY DGP //////////////////// #if !defined(NO_CLOCKS) && (SYSTEM_TYPE != WINDOWS) ! # if !defined(CLK_TCK) && defined(HZ) ! # define CLK_TCK HZ # endif # ifdef CLK_TCK # define HAS_TIMES --- 467,478 ---- ///// TEMPORARY MACROS, TO BE FIXED UP BY DGP //////////////////// #if !defined(NO_CLOCKS) && (SYSTEM_TYPE != WINDOWS) ! # ifndef CLK_TCK ! # ifdef _SC_CLK_TCK ! static const long CLK_TCK = sysconf(_SC_CLK_TCK); ! # elif defined(HZ) ! # define CLK_TCK HZ ! # endif # endif # ifdef CLK_TCK # define HAS_TIMES *************** *** 526,532 **** # ifdef HAS_CLOCK static Oc_TimeVal cpu_accum(CLOCKS_PER_SEC,(unsigned long)clock_t(-1)); static Oc_TimeVal cpu_last(CLOCKS_PER_SEC,(unsigned long)clock_t(-1)); ! static Oc_TimeVal cpu_now(CLK_TCK,(unsigned long)clock_t(-1)); cpu_now.ticks=clock(); cpu_now.overflow=cpu_last.overflow; if(cpu_now.ticks