]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[time] Use currticks() to provide the null system time
authorMichael Brown <mcb30@ipxe.org>
Sat, 19 Apr 2025 12:35:23 +0000 (13:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sat, 19 Apr 2025 12:35:23 +0000 (13:35 +0100)
commit453acba7dc4b34fa3814755671755e2601a9059d
treed5412fd07ababe42f7cfdf1593e37cfcb95275fa
parent423cdbeb398ec82e8457bec111deac1465d2a107
[time] Use currticks() to provide the null system time

For platforms with no real-time clock (such as RISC-V SBI) we use the
null time source, which currently just returns a constant zero.

Switch to using currticks() to provide a clock that does not represent
the real current time, but does at least advance at approximately the
correct rate.  In conjunction with the "ntp" command, this allows
these platforms to use time-dependent features such as X.509
certificate verification for HTTPS connections.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/null_time.c
src/include/ipxe/null_time.h