diff options
author | Denys Vlasenko | 2013-03-29 12:30:33 +0100 |
---|---|---|
committer | Denys Vlasenko | 2013-03-29 12:30:33 +0100 |
commit | 8f2cb7ab26b9c720c24cdeffb624bfe0c2352353 (patch) | |
tree | 8d76825f24632d338118919b0553f542fdd3a8aa /include | |
parent | 6c852bfcadd78f53ec7a5f35882636a2a4a66eb0 (diff) | |
download | busybox-8f2cb7ab26b9c720c24cdeffb624bfe0c2352353.zip busybox-8f2cb7ab26b9c720c24cdeffb624bfe0c2352353.tar.gz |
libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()
function old new delta
strftime_fmt - 53 +53
strftime_YYYYMMDDHHMMSS - 12 +12
strftime_HHMMSS - 12 +12
human_time 44 43 -1
fmtstr_t 9 - -9
step_time 361 345 -16
watch_main 261 232 -29
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes
text data bss dec hex filename
919203 932 17692 937827 e4f63 busybox_old
919209 932 17692 937833 e4f69 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 79a37a7..6dd4d7c 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -523,7 +523,8 @@ struct BUG_too_small { void parse_datestr(const char *date_str, struct tm *ptm) FAST_FUNC; time_t validate_tm_time(const char *date_str, struct tm *ptm) FAST_FUNC; - +char *strftime_HHMMSS(char *buf, unsigned len, time_t *tp) FAST_FUNC; +char *strftime_YYYYMMDDHHMMSS(char *buf, unsigned len, time_t *tp) FAST_FUNC; int xsocket(int domain, int type, int protocol) FAST_FUNC; void xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen) FAST_FUNC; |