1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__ISO8601_INTERNAL__H
11 # define PCMK__ISO8601_INTERNAL__H
12
13 #include <time.h>
14 #include <sys/time.h>
15 #include <ctype.h>
16 #include <crm/common/iso8601.h>
17
18 typedef struct pcmk__time_us pcmk__time_hr_t;
19
20 pcmk__time_hr_t *pcmk__time_hr_convert(pcmk__time_hr_t *target, crm_time_t *dt);
21 void pcmk__time_set_hr_dt(crm_time_t *target, pcmk__time_hr_t *hr_dt);
22 pcmk__time_hr_t *pcmk__time_timeval_hr_convert(pcmk__time_hr_t *target,
23 struct timeval *tv);
24 pcmk__time_hr_t *pcmk__time_hr_new(const char *date_time);
25 void pcmk__time_hr_free(pcmk__time_hr_t *hr_dt);
26 char *pcmk__time_format_hr(const char *format, pcmk__time_hr_t *hr_dt);
27 const char *pcmk__epoch2str(time_t *when);
28 const char *pcmk__readable_interval(guint interval_ms);
29
30 struct pcmk__time_us {
31 int years;
32 int months;
33 int days;
34 int seconds;
35 int offset;
36 bool duration;
37 int useconds;
38 };
39
40 #endif