[BACK]Return to time.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Diff for /OpenXM_contrib2/asir2000/builtin/time.c between version 1.7 and 1.8

version 1.7, 2009/03/16 16:43:02 version 1.8, 2011/05/11 06:03:53
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM: OpenXM_contrib2/asir2000/builtin/time.c,v 1.6 2008/09/11 15:17:55 ohara Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/time.c,v 1.7 2009/03/16 16:43:02 ohara Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
   #include <limits.h>
   
 void Ptime(), Pcputime(), Pcurrenttime(), Ptstart(), Ptstop();  void Ptime(), Pcputime(), Pcurrenttime(), Ptstart(), Ptstop();
 void Pdcurrenttime();  void Pdcurrenttime();
Line 113  LIST *listp;
Line 114  LIST *listp;
         Real re,rg,rr;          Real re,rg,rr;
         NODE a,b,w,r;          NODE a,b,w,r;
         Q words;          Q words;
         long t;          size_t t;
         int u,l;          unsigned int u,l;
         N n;          N n;
         double rtime;          double rtime;
         double get_rtime();          double get_rtime();
   
         rtime = get_rtime(); MKReal(rtime,rr);          rtime = get_rtime(); MKReal(rtime,rr);
         t = get_allocwords();          t = get_allocwords();
 #if SIZEOF_LONG == 8          if(sizeof(size_t)>sizeof(int)) {
         u = t>>32; l = t&(0xffffffff);                  u = t>>(sizeof(int)*CHAR_BIT); l = t&(~0);
         if ( !u ) STOQ(l,words);                  if ( !u ) STOQ(l,words);
         else {                  else {
                 n = NALLOC(2); PL(n)=2; BD(n)[0] = l; BD(n)[1] = u;                          n = NALLOC(2); PL(n)=2; BD(n)[0] = l; BD(n)[1] = u;
                 NTOQ(n,1,words);                          NTOQ(n,1,words);
                   }
           }else {
                   STOQ(t,words);
         }          }
 #else  
         STOQ(t,words);  
 #endif  
         get_eg(&eg); MKReal(eg.exectime,re); MKReal(eg.gctime,rg);          get_eg(&eg); MKReal(eg.exectime,re); MKReal(eg.gctime,rg);
         MKNODE(r,rr,0); MKNODE(w,words,r); MKNODE(a,rg,w); MKNODE(b,re,a);          MKNODE(r,rr,0); MKNODE(w,words,r); MKNODE(a,rg,w); MKNODE(b,re,a);
         MKLIST(*listp,b);          MKLIST(*listp,b);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>