Fixed ford ot anchor at current main revision, not time

Conflicts:
	n/t.c
	urb/zod/main/arvo/ford.hoon
	v/raft.c
This commit is contained in:
Anton Dyudin 2015-02-19 19:55:18 -08:00 committed by Philip C Monk
parent 7daed9bcb3
commit add40d4dee
2 changed files with 21 additions and 17 deletions

18
n/t.c
View File

@ -1,4 +1,4 @@
/* g/t.c
/* g/t.c -
**
** This file is in the public domain.
*/
@ -44,6 +44,7 @@ void
u3t_slog(u3_noun hod)
{
#ifdef GHETTO
static int old;
static struct timeval b4, f2, d0;
c3_w ms_w;
@ -52,12 +53,19 @@ u3t_slog(u3_noun hod)
gettimeofday(&f2, 0);
timersub(&f2, &b4, &d0);
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
printf("%d.%dms ", ms_w, (int) (d0.tv_usec % 1000) / 10);
}
if (ms_w > 10) {
printf("%6d.%02dms ", ms_w, (int) (d0.tv_usec % 1000) / 10);
gettimeofday(&b4, 0);
old = 1;
#endif
}
else {
printf(" ");
}
}
else gettimeofday(&b4, 0);
old = 1;
#endif
if ( c3y == u3du(hod) ) {
u3_noun pri = u3h(hod);

View File

@ -1575,20 +1575,16 @@ _raft_punk(u3_noun ovo)
#ifdef GHETTO
c3_w ms_w;
c3_w clr_w;
gettimeofday(&f2, 0);
timersub(&f2, &b4, &d0);
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
if(c3__belt != u3h(u3t(ovo))){
uL(fprintf(uH, "punk %s %d.%dms\x1b[0m\n",
txt_c, ms_w, (int) (d0.tv_usec % 1000) / 10));
clr_w = ms_w > 1000 ? 1 : ms_w < 100 ? 2 : 3; // red, green, yellow
if(!(c3__belt == u3h(u3t(ovo)) && clr_w == 2)){
uL(fprintf(uH, "\x1b[3%dm%%punk %s %4d.%02dms\x1b[0m\n",
clr_w, txt_c, ms_w, (int) (d0.tv_usec % 1000) / 10));
}
// clr_w = ms_w > 1000 ? 1 : ms_w < 100 ? 2 : 3; // red, green, yellow
// if(c3__belt != u3h(u3t(ovo)) || clr_w != 2){
// uL(fprintf(uH, "\x1b[3%dm%%punk %s %d.%dms\x1b[0m\n",
// clr_w, txt_c, ms_w, (int) (d0.tv_usec % 1000) / 10));
// }
free(txt_c);
#endif