1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #ifndef CRM_COMMON_ISO8601_INTERNAL
20 # define CRM_COMMON_ISO8601_INTERNAL
21 #include <time.h>
22 #include <sys/time.h>
23 #include <ctype.h>
24 #include <crm/common/iso8601.h>
25
26 typedef struct crm_time_us crm_time_hr_t;
27 crm_time_hr_t *crm_time_hr_convert(crm_time_hr_t *target, crm_time_t *dt);
28 void crm_time_set_hr_dt(crm_time_t *target, crm_time_hr_t *hr_dt);
29 crm_time_hr_t *crm_time_timeval_hr_convert(crm_time_hr_t *target,
30 struct timeval *tv);
31 crm_time_hr_t *crm_time_hr_new(const char *date_time);
32 void crm_time_hr_free(crm_time_hr_t * hr_dt);
33 char *crm_time_format_hr(const char *format, crm_time_hr_t * hr_dt);
34
35 crm_time_t *parse_date(const char *date_str);
36
37
38 struct crm_time_us {
39 int years;
40 int months;
41 int days;
42 int seconds;
43 int offset;
44 bool duration;
45 int useconds;
46 };
47 #endif