[gforth] / gforth / prim  

gforth: gforth/prim

Diff for /gforth/prim between version 1.261 and 1.264

version 1.261, Fri Dec 2 21:59:09 2011 UTC version 1.264, Sat Dec 31 15:29:25 2011 UTC
Line 1 
Line 1 
 \ Gforth primitives  \ Gforth primitives
   
 \ Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.  \ Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 1103 
Line 1103 
 :  :
     0 ?DO 2* LOOP ;      0 ?DO 2* LOOP ;
   
   umax    ( u1 u2 -- u )  core
   if (u1<u2)
     u = u2;
   else
     u = u1;
   :
    2dup u< IF swap THEN drop ;
   
   umin    ( u1 u2 -- u )  core
   if (u1<u2)
     u = u1;
   else
     u = u2;
   :
    2dup u> IF swap THEN drop ;
   
 \g compare  \g compare
   
 \ comparisons(prefix, args, prefix, arg1, arg2, wordsets...)  \ comparisons(prefix, args, prefix, arg1, arg2, wordsets...)
Line 2035 
Line 2051 
   
 ntime   ( -- dtime )    gforth  ntime   ( -- dtime )    gforth
 ""Report the current time in nanoseconds since some epoch.""  ""Report the current time in nanoseconds since some epoch.""
 #ifdef HAVE_CLOCK_GETTIME  
 struct timespec time1;  struct timespec time1;
   #ifdef HAVE_CLOCK_GETTIME
 clock_gettime(CLOCK_REALTIME,&time1);  clock_gettime(CLOCK_REALTIME,&time1);
 dtime = timespec2ns(&time1);  
 #else  #else
 struct timeval time1;  struct timeval time2;
 gettimeofday(&time1,NULL);  gettimeofday(&time2,NULL);
 dtime = timeval2us(&time1) * 1000LL;  time1.tv_sec = time2.tv_sec;
   time1.tv_nsec = time2.tv_usec*1000;
 #endif  #endif
   dtime = timespec2ns(&time1);
   
 \+  \+
   


Generate output suitable for use with a patch program
Legend:
Removed from v.1.261  
changed lines
  Added in v.1.264

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help