Debian Codegraph @

.cargo/vendor/r-efi/src/protocols/timestamp.rs

raw
1 //! EFI Timestamp Protocol
2 //!
3 //! The Timestamp protocol provides a platform independent interface for
4 //! retrieving a high resolution timestamp counter.
5
6 pub const PROTOCOL_GUID: crate::base::Guid = crate::base::Guid::from_fields(
7 0xafbfde41,
8 0x2e6e,
9 0x4262,
10 0xba,
11 0x65,
12 &[0x62, 0xb9, 0x23, 0x6e, 0x54, 0x95],
13 );
14
15 #[repr(C)]
16 #[derive(Clone, Copy, Debug)]
17 pub struct Properties {
18 pub frequency: u64,
19 pub end_value: u64,
20 }
21
22 pub type ProtocolGetTimestamp = eficall! {fn() -> u64};
23
24 pub type ProtocolGetProperties = eficall! {fn(
25 *mut Properties,
26 ) -> crate::base::Status};
27
28 #[repr(C)]
29 pub struct Protocol {
30 pub get_timestamp: ProtocolGetTimestamp,
31 pub get_properties: ProtocolGetProperties,
32 }