Skip to content

Commit 33bd50c

Browse files
committed
feat(time): 添加RTC时间和时区支持
1 parent 4901d80 commit 33bd50c

File tree

4 files changed

+822
-3
lines changed

4 files changed

+822
-3
lines changed

kernel/src/libs/Kconfig.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@ default = "Info"
77
desc = "Kernel Log Level"
88
options = ["Trace", "Debug", "Info", "Warn", "Error"]
99
help = "Sets the maximum log level for the kernel logger."
10+
11+
[[config]]
12+
name = "TIMEZONE"
13+
type = "int"
14+
default = +8
15+
desc = "Timezone"
16+
help = "Timezone offset from UTC (in hours)."
17+
rust_type = "i8"

kernel/src/libs/time/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub mod apic;
22
pub mod pit;
3+
pub mod rtc;
34
pub mod tsc;
45

56
pub use tsc::{init, sleep_us, time_since_boot};

0 commit comments

Comments
 (0)