summaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-27 16:17:46 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-27 16:59:56 -0400
commit194a34cdc28c6b309dd9a32f5446409810b1d32b (patch)
tree6828a25a54dc81331bc1fead946a0c1ade2fede4 /src/common/util.h
parent235ddb15a0f9fc322002ba39e8900634316dc333 (diff)
downloadtor-194a34cdc28c6b309dd9a32f5446409810b1d32b.tar.gz
tor-194a34cdc28c6b309dd9a32f5446409810b1d32b.zip
Extract time encoding functions into lib/encoding
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/common/util.h b/src/common/util.h
index fa7886d0f7..f9018ff880 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -38,6 +38,7 @@
#include "lib/fs/dir.h"
#include "lib/fs/files.h"
#include "lib/fs/path.h"
+#include "lib/encoding/time_fmt.h"
void tor_log_mallinfo(int severity);
@@ -81,22 +82,6 @@ char *tor_escape_str_for_pt_args(const char *string,
long tv_udiff(const struct timeval *start, const struct timeval *end);
long tv_mdiff(const struct timeval *start, const struct timeval *end);
int64_t tv_to_msec(const struct timeval *tv);
-int tor_timegm(const struct tm *tm, time_t *time_out);
-#define RFC1123_TIME_LEN 29
-void format_rfc1123_time(char *buf, time_t t);
-int parse_rfc1123_time(const char *buf, time_t *t);
-#define ISO_TIME_LEN 19
-#define ISO_TIME_USEC_LEN (ISO_TIME_LEN+7)
-void format_local_iso_time(char *buf, time_t t);
-void format_iso_time(char *buf, time_t t);
-void format_local_iso_time_nospace(char *buf, time_t t);
-void format_iso_time_nospace(char *buf, time_t t);
-void format_iso_time_nospace_usec(char *buf, const struct timeval *tv);
-int parse_iso_time_(const char *cp, time_t *t, int strict, int nospace);
-int parse_iso_time(const char *buf, time_t *t);
-int parse_iso_time_nospace(const char *cp, time_t *t);
-int parse_http_time(const char *buf, struct tm *tm);
-int format_time_interval(char *out, size_t out_len, long interval);
/* File helpers */