aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-06 06:08:45 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-06 06:08:59 -0400
commita17902373dc3fd2f06f0796ed2621109cb4acdd3 (patch)
tree7c2bac0d8fca91b1916e72a79fef5a3b3520c6ad /src/irc.c
parente00d109f7997ea3c238677a28271ced8fa8f9d4e (diff)
downloadfujinet-chat-a17902373dc3fd2f06f0796ed2621109cb4acdd3.tar.gz
Precalculate timer intervals (in config segment; client gets them preset). 6780 bytes free.
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/irc.c b/src/irc.c
index 9c683da..5aee5e7 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -16,6 +16,7 @@
#include "keytab.h"
#include "kgetc.h"
#include "streq.h"
+#include "timers.h"
#ifndef VERSION
#define VERSION "?????"
@@ -132,10 +133,10 @@ static void print_ping_time(char *p) {
pingtime = now - pingtime;
- sec = pingtime / hz;
- frac = pingtime % hz;
+ sec = pingtime / timers.hz;
+ frac = pingtime % timers.hz;
frac *= 100;
- frac /= hz;
+ frac /= timers.hz;
scr_print_active("*** ");
scr_print_active(msg_src);
@@ -677,7 +678,7 @@ void print_errnum(void) {
static void start_minute_timer() {
OS.cdtmf4 = 0xff;
- OS.cdtmv4 = 60 * hz;
+ OS.cdtmv4 = timers.one_sec;
}
static char service_minute_timer() {