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

Diff for /OpenXM_contrib2/asir2018/builtin/time.c between version 1.1 and 1.3

version 1.1, 2018/09/19 05:45:06 version 1.3, 2018/09/28 08:20:27
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: OpenXM_contrib2/asir2018/builtin/time.c,v 1.2 2018/09/27 02:39:37 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 72  void Pcurrenttime(Z *rp)
Line 72  void Pcurrenttime(Z *rp)
 {  {
   int t;    int t;
   
   t = (int)get_current_time(); STOQ(t,*rp);    t = (int)get_current_time(); STOZ(t,*rp);
 }  }
   
 void Pdcurrenttime(Real *rp)  void Pdcurrenttime(Real *rp)
Line 113  void Ptime(LIST *listp)
Line 113  void Ptime(LIST *listp)
   
   rtime = get_rtime(); MKReal(rtime,rr);    rtime = get_rtime(); MKReal(rtime,rr);
   t = get_allocwords();    t = get_allocwords();
   STOQ(t,words);    STOZ(t,words);
   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);
Line 125  void printtime(struct oEGT *egt0,struct oEGT *egt1,dou
Line 125  void printtime(struct oEGT *egt0,struct oEGT *egt1,dou
   
   e = egt1->exectime - egt0->exectime;    e = egt1->exectime - egt0->exectime;
   if ( e < 0 ) e = 0;    if ( e < 0 ) e = 0;
   g = egt1->gctime - egt0->gctime;    g = 0;
   if ( g < 0 ) g = 0;    fprintf(stderr,"%.4gsec(%.4gsec)\n",e,r);
   if ( g )  
     fprintf(stderr,"%.4gsec + gc : %.4gsec(%.4gsec)\n",e,g,r);  
   else  
     fprintf(stderr,"%.4gsec(%.4gsec)\n",e,r);  
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

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