aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-08 07:34:06 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-08 07:34:23 -0400
commitcd644a6d52fecb59c0daaa36325f740089d321ce (patch)
tree824cf9f70c287aa486d4aed60f8ac08f2a678643 /src/irc.c
parent4ae461b9332f5642df85b8c204d88601f6a1adef (diff)
downloadfujinet-chat-cd644a6d52fecb59c0daaa36325f740089d321ce.tar.gz
Fix stupidity in jifsec.s: I was already using FR0 for something else... 7359 bytes free with no crashes!
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');
}