22 lines
351 B
C
22 lines
351 B
C
|
#ifndef CORE_PERIOD_H
|
||
|
#define CORE_PERIOD_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
uint16_t start;
|
||
|
uint16_t end;
|
||
|
} period_t;
|
||
|
|
||
|
period_t*
|
||
|
period_create(uint16_t start, uint16_t end);
|
||
|
|
||
|
int
|
||
|
period_includes_time(period_t *period, uint16_t timestamp);
|
||
|
|
||
|
int
|
||
|
period_helper_parse_hhmm(const char *hhmm_str, uint16_t *hhmm);
|
||
|
|
||
|
#endif /* CORE_PERIOD_H */
|