- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimestamp.h
More file actions
Latest commit
19 lines (13 loc) · 402 Bytes
/
Copy pathtimestamp.h
File metadata and controls
19 lines (13 loc) · 402 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndefTIMESTAMP_H
#defineTIMESTAMP_H
#define_XOPEN_SOURCE
#ifndef_BSD_SOURCE
#define_BSD_SOURCE
#endif
#include<time.h>
//converts timestamp to string of form: Wed, 21 Oct 2015 07:28:00 GMT
//returns -1 or error
inttime2str(consttime_t*timestamp, char*buf, size_tsize);
//inverse of time2str, tries multiple timestatmp formats
intstr2time(constchar*buf, time_t*timestamp);
#endif