aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/irc.c b/src/irc.c
index d052937..885ab2b 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -121,6 +121,7 @@ static void do_priv_nick(void) {
static void print_ping_time(char *p) {
extern void print_jif_sec(unsigned int j);
static unsigned int now, pingtime;
+ // static unsigned int sec, frac;
now = read_rtclok();
pingtime = (unsigned int)a2uint(p);
@@ -128,9 +129,20 @@ static void print_ping_time(char *p) {
/* correct for rtclock rollover (every ~9 mins) */
if(now < pingtime) now |= 0x8000;
+ /*
+ pingtime = now - pingtime;
+ sec = pingtime / timers.hz;
+ frac = pingtime % timers.hz;
+ frac *= 100;
+ frac /= timers.hz;
+ */
+
scr_print_active("*** ");
scr_print_active(msg_src);
scr_print_active(" lag: ");
+ // scr_act_printnum(sec);
+ // scr_putc_active('.');
+ // scr_act_printnum(frac);
print_jif_sec(now - pingtime);
scr_putc_active('s');
}