aboutsummaryrefslogtreecommitdiff
path: root/interval.h
blob: e4a799e69a6a3deb00c1bd6b142acbe813c3c52d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
typedef struct Interval Interval;
struct Interval
{
	uvlong t0, t1;
	uvlong ∆t;	/* duration */

	int (*before)(Interval*, Interval*);
	int (*equals)(Interval*, Interval*);
	int (*overlaps)(Interval*, Interval*);
	int (*meets)(Interval*, Interval*);
	int (*during)(Interval*, Interval*);
	int (*intersects)(Interval*, Interval*);
};

Interval *mkinterval(uvlong, uvlong);
void rminterval(Interval*);