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

Diff for /OpenXM_contrib2/asir2018/engine/init.c between version 1.1 and 1.2

version 1.1, 2018/09/19 05:45:07 version 1.2, 2018/09/27 02:39:37
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/engine/init.c,v 1.1 2018/09/19 05:45:07 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 159  void nglob_init() {
Line 159  void nglob_init() {
   init_gmpq();    init_gmpq();
 }  }
   
 extern double GC_get_gctime();  
 double suspend_start;  double suspend_start;
 double suspended_time=0;  double suspended_time=0;
   
 void get_eg(struct oEGT *p)  void get_eg(struct oEGT *p)
 {  {
   double gctime = GC_get_gctime();    p->exectime = get_clock()-suspended_time; p->gctime = 0;
   p->exectime = get_clock() - gctime - suspended_time; p->gctime = gctime;  
 }  }
   
 void init_eg(struct oEGT *eg)  void init_eg(struct oEGT *eg)
Line 177  void init_eg(struct oEGT *eg)
Line 175  void init_eg(struct oEGT *eg)
 void add_eg(struct oEGT *base,struct oEGT *start,struct oEGT *end)  void add_eg(struct oEGT *base,struct oEGT *start,struct oEGT *end)
 {  {
   base->exectime += end->exectime - start->exectime;    base->exectime += end->exectime - start->exectime;
   base->gctime += end->gctime - start->gctime;  
 }  }
   
 void print_eg(char *item,struct oEGT *eg)  void print_eg(char *item,struct oEGT *eg)
 {  {
   printf("%s=(%.4g,%.4g)",item,eg->exectime,eg->gctime);    printf("%s=(%.4g)",item,eg->exectime);
 }  }
   
 void print_split_eg(struct oEGT *start,struct oEGT *end)  void print_split_eg(struct oEGT *start,struct oEGT *end)
Line 190  void print_split_eg(struct oEGT *start,struct oEGT *en
Line 187  void print_split_eg(struct oEGT *start,struct oEGT *en
   struct oEGT base;    struct oEGT base;
   
   init_eg(&base); add_eg(&base,start,end);    init_eg(&base); add_eg(&base,start,end);
   printf("(%.4g,%.4g)",base.exectime,base.gctime);    printf("(%.4g)",base.exectime);
 }  }
   
 void print_split_e(struct oEGT *start,struct oEGT *end)  void print_split_e(struct oEGT *start,struct oEGT *end)

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

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