summaryrefslogtreecommitdiff
path: root/dbutil.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2014-03-13 23:50:09 +0800
committerMatt Johnston <matt@ucc.asn.au>2014-03-13 23:50:09 +0800
commite767bbb41f277ebb8f477e5cda5b97a3a52b08a7 (patch)
tree79e85d770254e5a929aa6d3e09974cbf1fdd6d2e /dbutil.h
parent2b599df57abf70963706b62604ecc2c421b549da (diff)
downloaddropbear-e767bbb41f277ebb8f477e5cda5b97a3a52b08a7.tar.gz
Add new monotonic_now() wrapper so that timeouts are unaffected by
system clock changes
Diffstat (limited to 'dbutil.h')
-rw-r--r--dbutil.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/dbutil.h b/dbutil.h
index 4c7b123..afc49ff 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -106,4 +106,9 @@ int m_str_to_uint(const char* str, unsigned int *val);
/* Returns 0 if a and b have the same contents */
int constant_time_memcmp(const void* a, const void *b, size_t n);
+/* Returns a time in seconds that doesn't go backwards - does not correspond to
+a real-world clock */
+time_t monotonic_now();
+
+
#endif /* _DBUTIL_H_ */