Skip to content

Conversation

@BillXWB
Copy link

@BillXWB BillXWB commented Mar 25, 2022

config::CLOCK_FREQ: usize = 12_500_000timer::MICRO_PER_SEC: usize = 1_000_000,直接除会舍掉 0.5,有较大的误差。实验如果使用 get_time 实现计时会无法通过测试。

@Gallium70
Copy link
Collaborator

在内核态直接使用浮点类型的话,可能需要处理sstatus.FS位的状态

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants