From 5e86efde052760a53ca92ddd411db095fcf4a970 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 26 Oct 2026 16:37:55 +0100 Subject: Use new fdstate subsystem to store per fd cookie and timeout --- ot_timeout.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 ot_timeout.h (limited to 'ot_timeout.h') diff --git a/ot_timeout.h b/ot_timeout.h deleted file mode 100644 index 1027c2e..0000000 --- a/ot_timeout.h +++ /dev/null @@ -1,39 +0,0 @@ -/* This software was written by Dirk Engling - It is considered beerware. Prost. Skol. Cheers or whatever. - - $id$ */ - -#ifndef OT_TIMEOUT_H__ -#define OT_TIMEOUT_H__ - -#include -#include - -/* Libowfat */ -#include "io.h" - -#include "trackerlogic.h" - -/* io_timeout wants an absolute TAI64 deadline and io_timeouted skips any - socket whose deadline is zero, so that is how a socket is told to wait - indefinitely. - - The deadline is taken from the cached clock rather than from - gettimeofday, which is too expensive to call at this rate on FreeBSD. */ - -static inline void timeout_never(int64_t sock) { - tai6464 t; - - memset(&t, 0, sizeof(t)); - io_timeout(sock, t); -} - -static inline void timeout_in(int64_t sock, unsigned int seconds) { - tai6464 t; - - memset(&t, 0, sizeof(t)); - tai_unix(&t.sec, g_now_seconds + seconds); - io_timeout(sock, t); -} - -#endif -- cgit v1.3