pacemaker  2.0.4-2deceaa3ae
Scalable High-Availability cluster resource manager
iso8601_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2020 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
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 
23  struct timeval *tv);
24 pcmk__time_hr_t *pcmk__time_hr_new(const char *date_time);
26 char *pcmk__time_format_hr(const char *format, pcmk__time_hr_t *hr_dt);
27 const char *pcmk__epoch2str(time_t *when);
28 
29 struct pcmk__time_us {
30  int years;
31  int months; /* Only for durations */
32  int days;
33  int seconds;
34  int offset; /* Seconds */
35  bool duration;
36  int useconds;
37 };
38 
39 #endif
pcmk__time_us::seconds
int seconds
Definition: iso8601_internal.h:33
pcmk__time_us::days
int days
Definition: iso8601_internal.h:32
pcmk__time_us::years
int years
Definition: iso8601_internal.h:30
pcmk__time_hr_new
pcmk__time_hr_t * pcmk__time_hr_new(const char *date_time)
Definition: iso8601.c:1605
pcmk__time_us::offset
int offset
Definition: iso8601_internal.h:34
pcmk__time_us::months
int months
Definition: iso8601_internal.h:31
pcmk__time_us::duration
bool duration
Definition: iso8601_internal.h:35
pcmk__time_hr_convert
pcmk__time_hr_t * pcmk__time_hr_convert(pcmk__time_hr_t *target, crm_time_t *dt)
Definition: iso8601.c:1556
iso8601.h
ISO_8601 Date handling.
pcmk__time_us
Definition: iso8601_internal.h:29
pcmk__time_format_hr
char * pcmk__time_format_hr(const char *format, pcmk__time_hr_t *hr_dt)
Definition: iso8601.c:1631
target
const char * target
Definition: pcmk_fence.c:28
pcmk__epoch2str
const char * pcmk__epoch2str(time_t *when)
Definition: iso8601.c:1715
pcmk__time_timeval_hr_convert
pcmk__time_hr_t * pcmk__time_timeval_hr_convert(pcmk__time_hr_t *target, struct timeval *tv)
Definition: iso8601.c:1591
pcmk__time_set_hr_dt
void pcmk__time_set_hr_dt(crm_time_t *target, pcmk__time_hr_t *hr_dt)
Definition: iso8601.c:1577
pcmk__time_us::useconds
int useconds
Definition: iso8601_internal.h:36
pcmk__time_hr_free
void pcmk__time_hr_free(pcmk__time_hr_t *hr_dt)
Definition: iso8601.c:1625
crm_time_t
struct crm_time_s crm_time_t
Definition: iso8601.h:32