Conversation
This makes it clearer that this value can be any of those three.
This adds the first basic integration with Duration(). This way, for example, one can measure the duration of some UEFI operations.
| month += 1; | ||
| } | ||
|
|
||
| let day = (days + 1) as u8; |
|
Since handling time correctly is complicated and nuanced, I wonder if we should just delegate to one of the existing popular time libraries. I'm not particularly confident in my ability to correctly identify bugs in time handling, so I'd rather limit our code to simple conversions if possible. Currently I think the main ecosystem time libraries are time and jiff. ( So, rather than implementing any time logic ourselves, we could do something like add an optional dep on In |
I agree. I see the proposed |
I could replace this with a clearly better implementation: #1899 |
This is a larger PR improving the handling of
struct Timefromuefi-raw. On a very high level, we can convert a UEFI time to UNIX UTC Timestamps in nanoseconds and also create it from such a timestamp.This allows:
elapsed_since(&self, future: &Self) -> Option<Duration> {}Hints for Reviewers
Checklist