blob: fa853d8f4211b5c34ec592308cf028e3dbd0b406 [file] [log] [blame]
Jeff Hostetleree4512e2019-02-22 14:25:01 -08001#ifndef TR2_TBUF_H
2#define TR2_TBUF_H
3
4/*
5 * A simple wrapper around a fixed buffer to avoid C syntax
6 * quirks and the need to pass around an additional size_t
7 * argument.
8 */
9struct tr2_tbuf {
10 char buf[32];
11};
12
13/*
14 * Fill buffer with formatted local time string.
15 */
16void tr2_tbuf_local_time(struct tr2_tbuf *tb);
17
18/*
Jeff Hostetlerbad229a2019-04-15 13:39:48 -070019 * Fill buffer with formatted UTC datatime string.
Jeff Hostetleree4512e2019-02-22 14:25:01 -080020 */
Jeff Hostetlerbad229a2019-04-15 13:39:48 -070021void tr2_tbuf_utc_datetime_extended(struct tr2_tbuf *tb);
Jeff Hostetler08881b92019-04-15 13:39:49 -070022void tr2_tbuf_utc_datetime(struct tr2_tbuf *tb);
Jeff Hostetleree4512e2019-02-22 14:25:01 -080023
24#endif /* TR2_TBUF_H */