MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / parse_xml_duration

Function parse_xml_duration

lib/pengine/rules.c:491–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489 }
490
491crm_time_t *
492parse_xml_duration(crm_time_t * start, xmlNode * duration_spec)
493{
494 crm_time_t *end = NULL;
495 const char *value = NULL;
496
497 end = crm_time_new(NULL);
498 crm_time_set(end, start);
499
500 update_field("years", crm_time_add_years);
501 update_field("months", crm_time_add_months);
502 update_field("weeks", crm_time_add_weeks);
503 update_field("days", crm_time_add_days);
504 update_field("hours", crm_time_add_hours);
505 update_field("minutes", crm_time_add_minutes);
506 update_field("seconds", crm_time_add_seconds);
507
508 return end;
509}
510
511gboolean
512test_date_expression(xmlNode * time_expr, crm_time_t * now)

Callers 1

test_date_expressionFunction · 0.85

Calls 2

crm_time_newFunction · 0.85
crm_time_setFunction · 0.85

Tested by 1

test_date_expressionFunction · 0.68