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

rdtscp这个指令有问题 #4

Closed
crestxu opened this issue Aug 31, 2017 · 3 comments
Closed

rdtscp这个指令有问题 #4

crestxu opened this issue Aug 31, 2017 · 3 comments

Comments

@crestxu
Copy link

crestxu commented Aug 31, 2017

应该替换成
struct timeval now = { 0 };
gettimeofday( &now,NULL );
unsigned long long u = now.tv_sec;
u *= 1000;
u += now.tv_usec / 1000;
return u;

@dengoswei
Copy link
Collaborator

crest总好. 问题是 ? 内部旧代码一直在不严格的场景用RDTSCP, 精确的用gettimeofday..

@crestxu
Copy link
Author

crestxu commented Sep 1, 2017

我的机器上没有这个指令,哈哈哈

@dengoswei
Copy link
Collaborator

参照libco, 默认不用RDTSCP.. 最新代码.

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

No branches or pull requests

2 participants