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,
21 const crm_time_t *dt);
22 void pcmk__time_set_hr_dt(crm_time_t *target, const pcmk__time_hr_t *hr_dt);
23 pcmk__time_hr_t *pcmk__time_hr_now(time_t *epoch);
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, const pcmk__time_hr_t *hr_dt);
27 char *pcmk__epoch2str(const time_t *source, uint32_t flags);
28 char *pcmk__timespec2str(const struct timespec *ts, uint32_t flags);
29 const char *pcmk__readable_interval(guint interval_ms);
30 crm_time_t *pcmk__copy_timet(time_t source);
31
32 struct pcmk__time_us {
33 int years;
34 int months;
35 int days;
36 int seconds;
37 int offset;
38 bool duration;
39 int useconds;
40 };
41
42 #endif