Mercurial > dropbear
comparison dbutil.h @ 928:7cd89d4e0335
Add new monotonic_now() wrapper so that timeouts are unaffected by
system clock changes
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 13 Mar 2014 23:50:09 +0800 |
parents | aa689d140928 |
children | 5daedffd0769 |
comparison
equal
deleted
inserted
replaced
927:122fb3532038 | 928:7cd89d4e0335 |
---|---|
104 #define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0) | 104 #define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0) |
105 | 105 |
106 /* Returns 0 if a and b have the same contents */ | 106 /* Returns 0 if a and b have the same contents */ |
107 int constant_time_memcmp(const void* a, const void *b, size_t n); | 107 int constant_time_memcmp(const void* a, const void *b, size_t n); |
108 | 108 |
109 /* Returns a time in seconds that doesn't go backwards - does not correspond to | |
110 a real-world clock */ | |
111 time_t monotonic_now(); | |
112 | |
113 | |
109 #endif /* _DBUTIL_H_ */ | 114 #endif /* _DBUTIL_H_ */ |