mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 11:40:11 +03:00
Fixed ford ot anchor at current main revision, not time
This commit is contained in:
parent
3c96f935f7
commit
37cbb041c9
20
n/t.c
20
n/t.c
@ -42,6 +42,26 @@ u3_lo_tank(c3_l tab_l, u3_noun tac);
|
||||
void
|
||||
u3t_slog(u3_noun hod)
|
||||
{
|
||||
#ifdef GHETTO
|
||||
|
||||
static int old;
|
||||
static struct timeval b4, f2, d0;
|
||||
c3_w ms_w;
|
||||
|
||||
if ( old ) {
|
||||
gettimeofday(&f2, 0);
|
||||
timersub(&f2, &b4, &d0);
|
||||
ms_w = (d0.tv_sec * 1000) + (d0.tv_usec / 1000);
|
||||
if(ms_w > 10){
|
||||
printf("%3d.%dms ", ms_w, (d0.tv_usec % 1000) / 10);
|
||||
gettimeofday(&b4, 0);
|
||||
}
|
||||
}
|
||||
else gettimeofday(&b4, 0);
|
||||
|
||||
old = 1;
|
||||
|
||||
#endif
|
||||
if ( c3y == u3du(hod) ) {
|
||||
u3_noun pri = u3h(hod);
|
||||
|
||||
|
5
v/raft.c
5
v/raft.c
@ -1573,11 +1573,14 @@ _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);
|
||||
uL(fprintf(uH, "%%punk %s %d.%dms\n", txt_c, ms_w, (d0.tv_usec % 1000) / 10));
|
||||
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));
|
||||
free(txt_c);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user