pacemaker
2.0.1-9e909a5bdd
Scalable High-Availability cluster resource manager
include
crm
common
iso8601_internal.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2015 Andrew Beekhof <andrew@beekhof.net>
3
*
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
8
*
9
* This software is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
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);
/* in iso8601.c global but
36
not in header */
37
38
struct
crm_time_us
{
39
int
years
;
40
int
months
;
/* Only for durations */
41
int
days
;
42
int
seconds
;
43
int
offset
;
/* Seconds */
44
bool
duration
;
45
int
useconds
;
46
};
47
#endif
crm_time_us::years
int years
Definition:
iso8601_internal.h:39
crm_time_hr_convert
crm_time_hr_t * crm_time_hr_convert(crm_time_hr_t *target, crm_time_t *dt)
Definition:
iso8601.c:1296
crm_time_us::seconds
int seconds
Definition:
iso8601_internal.h:42
crm_time_us::offset
int offset
Definition:
iso8601_internal.h:43
crm_time_us
Definition:
iso8601_internal.h:38
crm_time_format_hr
char * crm_time_format_hr(const char *format, crm_time_hr_t *hr_dt)
Definition:
iso8601.c:1372
parse_date
crm_time_t * parse_date(const char *date_str)
Definition:
iso8601.c:640
crm_time_timeval_hr_convert
crm_time_hr_t * crm_time_timeval_hr_convert(crm_time_hr_t *target, struct timeval *tv)
Definition:
iso8601.c:1332
crm_time_us::useconds
int useconds
Definition:
iso8601_internal.h:45
iso8601.h
ISO_8601 Date handling.
crm_time_us::months
int months
Definition:
iso8601_internal.h:40
crm_time_hr_free
void crm_time_hr_free(crm_time_hr_t *hr_dt)
Definition:
iso8601.c:1366
crm_time_us::duration
bool duration
Definition:
iso8601_internal.h:44
crm_time_set_hr_dt
void crm_time_set_hr_dt(crm_time_t *target, crm_time_hr_t *hr_dt)
Definition:
iso8601.c:1318
crm_time_t
struct crm_time_s crm_time_t
Definition:
iso8601.h:41
crm_time_hr_new
crm_time_hr_t * crm_time_hr_new(const char *date_time)
Definition:
iso8601.c:1346
crm_time_us::days
int days
Definition:
iso8601_internal.h:41
Generated on Sat Nov 7 2020 19:21:48 for pacemaker by
1.8.20