pacemaker
2.0.3-4b1f869f0f
Scalable High-Availability cluster resource manager
include
crm
common
iso8601_internal.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015-2017 the Pacemaker project contributors
3
*
4
* The version control history for this file may have further details.
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
10
*
11
* This software is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#ifndef CRM_COMMON_ISO8601_INTERNAL
22
# define CRM_COMMON_ISO8601_INTERNAL
23
#include <time.h>
24
#include <sys/time.h>
25
#include <ctype.h>
26
#include <
crm/common/iso8601.h
>
27
28
typedef
struct
crm_time_us
crm_time_hr_t
;
29
crm_time_hr_t
*
crm_time_hr_convert
(
crm_time_hr_t
*target,
crm_time_t
*dt);
30
void
crm_time_set_hr_dt
(
crm_time_t
*target,
crm_time_hr_t
*hr_dt);
31
crm_time_hr_t
*
crm_time_timeval_hr_convert
(
crm_time_hr_t
*target,
32
struct
timeval *tv);
33
crm_time_hr_t
*
crm_time_hr_new
(
const
char
*date_time);
34
void
crm_time_hr_free
(
crm_time_hr_t
* hr_dt);
35
char
*
crm_time_format_hr
(
const
char
*format,
crm_time_hr_t
* hr_dt);
36
const
char
*
crm_now_string
(time_t *when);
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:1543
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:1618
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:1578
crm_time_us::useconds
int useconds
Definition:
iso8601_internal.h:45
iso8601.h
ISO_8601 Date handling.
crm_now_string
const char * crm_now_string(time_t *when)
Definition:
iso8601.c:1701
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:1612
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:1564
crm_time_t
struct crm_time_s crm_time_t
Definition:
iso8601.h:32
crm_time_hr_new
crm_time_hr_t * crm_time_hr_new(const char *date_time)
Definition:
iso8601.c:1592
crm_time_us::days
int days
Definition:
iso8601_internal.h:41
Generated on Wed Dec 9 2020 13:27:00 for pacemaker by
1.8.17