summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2023-01-06 02:37:04 +0000
committerDamien Miller <djm@mindrot.org>2023-01-06 16:21:38 +1100
commit4adf3817a24efe99b06e62630577d683c7cd8065 (patch)
treeea40b784f3c30ce8862210fdbe5824caf8226113 /misc.h
parent8c7c69d32375d2f3ce9da0109c9bffc560842316 (diff)
downloadopenssh-git-4adf3817a24efe99b06e62630577d683c7cd8065.tar.gz
upstream: add ptimeout API for keeping track of poll/ppoll
timeouts; ok dtucker markus OpenBSD-Commit-ID: 3335268ca135b3ec15a947547d7cfbb8ff929ead
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index 7ef75bd0..84d93e05 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.100 2022/06/03 04:30:47 djm Exp $ */
+/* $OpenBSD: misc.h,v 1.101 2023/01/06 02:37:04 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -208,6 +208,15 @@ void opt_array_append2(const char *file, const int line,
const char *directive, char ***array, int **iarray, u_int *lp,
const char *s, int i);
+struct timespec;
+void ptimeout_init(struct timespec *pt);
+void ptimeout_deadline_sec(struct timespec *pt, long sec);
+void ptimeout_deadline_ms(struct timespec *pt, long ms);
+void ptimeout_deadline_monotime(struct timespec *pt, time_t when);
+int ptimeout_get_ms(struct timespec *pt);
+struct timespec *ptimeout_get_tsp(struct timespec *pt);
+int ptimeout_isset(struct timespec *pt);
+
/* readpass.c */
#define RP_ECHO 0x0001