mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-02 07:06:41 +03:00
Cached %bake
Conflicts: urb/zod/main/arvo/ford.hoon urb/zod/main/mar/react-snip/door.hook urb/zod/main/mar/react/door.hook v/raft.c
This commit is contained in:
parent
a4764f8279
commit
cbe3c02e24
15
v/raft.c
15
v/raft.c
@ -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));
|
||||
@ -1577,7 +1579,16 @@ _raft_punk(u3_noun ovo)
|
||||
gettimeofday(&f2, 0);
|
||||
timersub(&f2, &b4, &d0);
|
||||
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
|
||||
uL(fprintf(uH, "%%punk %s %d.%dms\n", txt_c, ms_w, (int) (d0.tv_usec % 1000) / 10));
|
||||
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 %d.%dms\x1b[0m\n",
|
||||
// clr_w, txt_c, ms_w, (int) (d0.tv_usec % 1000) / 10));
|
||||
// }
|
||||
free(txt_c);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user