pacemaker  3.0.0-d8340737c4
Scalable High-Availability cluster resource manager
iso8601_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2024 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__CRM_COMMON_ISO8601_INTERNAL__H
11 #define PCMK__CRM_COMMON_ISO8601_INTERNAL__H
12 
13 #include <glib.h>
14 #include <time.h>
15 #include <sys/time.h>
16 #include <ctype.h>
17 #include <crm/common/iso8601.h>
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
24 
26  const crm_time_t *dt);
28 pcmk__time_hr_t *pcmk__time_hr_now(time_t *epoch);
29 pcmk__time_hr_t *pcmk__time_hr_new(const char *date_time);
31 char *pcmk__time_format_hr(const char *format, const pcmk__time_hr_t *hr_dt);
32 char *pcmk__epoch2str(const time_t *source, uint32_t flags);
33 char *pcmk__timespec2str(const struct timespec *ts, uint32_t flags);
34 const char *pcmk__readable_interval(guint interval_ms);
35 crm_time_t *pcmk__copy_timet(time_t source);
36 
37 struct pcmk__time_us {
38  int years;
39  int months; /* Only for durations */
40  int days;
41  int seconds;
42  int offset; /* Seconds */
43  bool duration;
44  int useconds;
45 };
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif // PCMK__CRM_COMMON_ISO8601_INTERNAL__H
pcmk__time_hr_t * pcmk__time_hr_new(const char *date_time)
Definition: iso8601.c:1996
crm_time_t * pcmk__copy_timet(time_t source)
Definition: iso8601.c:1488
struct crm_time_s crm_time_t
Definition: iso8601.h:32
void pcmk__time_hr_free(pcmk__time_hr_t *hr_dt)
Definition: iso8601.c:2013
pcmk__time_hr_t * pcmk__time_hr_convert(pcmk__time_hr_t *target, const crm_time_t *dt)
Definition: iso8601.c:1931
ISO_8601 Date handling.
void pcmk__time_set_hr_dt(crm_time_t *target, const pcmk__time_hr_t *hr_dt)
Definition: iso8601.c:1955
pcmk__time_hr_t * pcmk__time_hr_now(time_t *epoch)
Definition: iso8601.c:1977
const char * target
Definition: pcmk_fence.c:31
char * pcmk__time_format_hr(const char *format, const pcmk__time_hr_t *hr_dt)
Definition: iso8601.c:2029
char * pcmk__epoch2str(const time_t *source, uint32_t flags)
Definition: iso8601.c:2147
char * pcmk__timespec2str(const struct timespec *ts, uint32_t flags)
Definition: iso8601.c:2179
const char * pcmk__readable_interval(guint interval_ms)
Definition: iso8601.c:2206
uint64_t flags
Definition: remote.c:211