X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=include%2Ftr_util.h;h=9bf7d8e422e9c83db45c0459984323196a806f91;hb=81a61f8c6064bf52ff2a40a3d28e6ee5b2e478d4;hp=3b0e59792e67c5e37ca91c428821f17e9c38ff3d;hpb=e9332953189a29c0c52f703e4a3717b6141306d9;p=trust_router.git diff --git a/include/tr_util.h b/include/tr_util.h index 3b0e597..9bf7d8e 100644 --- a/include/tr_util.h +++ b/include/tr_util.h @@ -37,8 +37,14 @@ #include -void tr_bin_to_hex(const unsigned char * bin, size_t binlen, - char * hex_out, size_t hex_len); -TR_EXPORT int tr_cmp_timespec(struct timespec *ts1, struct timespec *ts2); +/* NB, tr_bin_to_hex() is also prototyped in trust_router/tr_dh.h */ +TR_EXPORT void tr_bin_to_hex(const unsigned char * bin, size_t binlen, + char * hex_out, size_t hex_len); +TR_EXPORT int tr_cmp_timespec(const struct timespec *ts1, const struct timespec *ts2); +int tr_add_timespec(const struct timespec *ts1, const struct timespec *ts2, struct timespec *sum); +int tr_sub_timespec(const struct timespec *ts1_copy, const struct timespec *ts2_copy, struct timespec *diff); +char *timespec_to_str(const struct timespec *ts); +struct timespec *tr_clock_convert(clockid_t from, const struct timespec *when, + clockid_t to, struct timespec *dst); #endif /* TR_UTIL_H */