diff options
Diffstat (limited to 'lib/uefi.c3l/uefi/protocol/services/time.c3i')
| -rw-r--r-- | lib/uefi.c3l/uefi/protocol/services/time.c3i | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/uefi.c3l/uefi/protocol/services/time.c3i b/lib/uefi.c3l/uefi/protocol/services/time.c3i new file mode 100644 index 0000000..e7e20bc --- /dev/null +++ b/lib/uefi.c3l/uefi/protocol/services/time.c3i @@ -0,0 +1,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*); |
