]> thyrsus.com Git - intercal.git/commitdiff
Partial correct of profiling output; it still goes haywire sometimes, though
authorAlex Smith <ais523@bham.ac.uk>
Sun, 29 Mar 2009 20:50:04 +0000 (16:50 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:35 +0000 (20:35 -0400)
src/yuk.c

index dc2beda71330361e9c18a55a3024a8a82c786a6b..1a50f8251347224c22304967cad2fbe1993f8bed 100644 (file)
--- a/src/yuk.c
+++ b/src/yuk.c
@@ -144,7 +144,7 @@ static yptimer yukclock_gettime()
 #endif
   /*@=unrecog@*/
   temp=(yptimer)ts.tv_nsec +
-    (yptimer)ts.tv_sec * (yptimer)1000000LU;
+    (yptimer)ts.tv_sec * (yptimer)1000000000LU;
   /* using wraparound as with gettimeofday */
   return temp;
 }
@@ -205,7 +205,7 @@ void yukline(int aboff,int emitlineno)
   if(yukopts & 1)
   { /* profile */
     temptick=YPGETTIME;
-    if(lastaboff) ypexectime[lastaboff]+=temptick-tickcount;
+    if(lastaboff) ypexectime[lastaboff]+=(yptimer)(temptick-tickcount);
     tickcount=temptick;
     if(ick_abstained[aboff]) ypabscount[aboff]++;
     else ypexecount[aboff]++;