summaryrefslogtreecommitdiff
path: root/lib/uefi.c3l/uefi/protocol/services/time.c3i
blob: e7e20bc943bdfaeb6caccf345e22588950f75516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module uefi::protocol::time;

const short UNSPECIFIED_TIMEZONE = 0x07FF;

struct Time @packed {
	ushort year;
	char month;
	char day;
	char hour;
	char minute;
	char second;
	char _pad1;
	uint nanosecond;
	short timezone;
	DaylightFlags daylight;
	char _pad2;
}

bitstruct DaylightFlags : char {
	bool adjust : 0;
	bool inDaylight : 1;
	char reserved : 2..7;
}

struct TimeCapabilities @packed {
	uint resolution;
	uint accuracy;
	bool setsToZero;
}

alias GetTimeFn = fn EfiStatus (Time*, TimeCapabilities*);