Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 get_time_us 的精度问题 #4

Open
wants to merge 1 commit into
base: ch3
Choose a base branch
from

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