summaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-08-07 02:46:16 +0000
committerNick Mathewson <nickm@torproject.org>2004-08-07 02:46:16 +0000
commitf6cc21874243b4d84a2db212e5c66058365bd7e7 (patch)
treeedde9db07ea5ff6a3f28591302fea7caac8388f9 /src/common/util.h
parentf47fe829dd722b502a186b9c437cf8f57bf55405 (diff)
downloadtor-f6cc21874243b4d84a2db212e5c66058365bd7e7.tar.gz
tor-f6cc21874243b4d84a2db212e5c66058365bd7e7.zip
Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
svn:r2182
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 4dafccc52f..792d5cffe2 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -201,8 +201,11 @@ void tv_add(struct timeval *a, struct timeval *b);
int tv_cmp(struct timeval *a, struct timeval *b);
time_t tor_timegm(struct tm *tm);
#define RFC1123_TIME_LEN 29
-void tor_format_rfc1123_time(char *buf, time_t t);
-int tor_parse_rfc1123_time(const char *buf, time_t *t);
+void format_rfc1123_time(char *buf, time_t t);
+int parse_rfc1123_time(const char *buf, time_t *t);
+#define ISO_TIME_LEN 19
+void format_iso_time(char *buf, time_t t);
+int parse_iso_time(const char *buf, time_t *t);
int write_all(int fd, const char *buf, size_t count, int isSocket);
int read_all(int fd, char *buf, size_t count, int isSocket);