Cached %bake

This commit is contained in:
Anton Dyudin 2015-02-20 13:42:57 -08:00
parent aa1cfca2dd
commit 9ff256099c

View File

@ -1566,7 +1566,9 @@ _raft_punk(u3_noun ovo)
#ifdef GHETTO
struct timeval b4, f2, d0;
gettimeofday(&b4, 0);
uL(fprintf(uH, "%%soft %s\n", txt_c));
if( c3__belt != u3h(u3t(ovo)) ){
uL(fprintf(uH, "%%soft %s\n", txt_c));
}
#endif
gon = u3m_soft(sec_w, u3v_poke, u3k(ovo));
@ -1579,8 +1581,10 @@ _raft_punk(u3_noun ovo)
timersub(&f2, &b4, &d0);
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
clr_w = ms_w > 1000 ? 1 : ms_w < 100 ? 2 : 3; // red, green, yellow
uL(fprintf(uH, "\x1b[3%dm%%punk %s %d.%dms\x1b[0m\n",
clr_w, txt_c, ms_w, (d0.tv_usec % 1000) / 10));
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, (d0.tv_usec % 1000) / 10));
}
free(txt_c);
#endif