We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
int main() { co_sched.goStart(0); timeval t; gettimeofday(&t, NULL); go [] {}; timeval t2; gettimeofday(&t2, NULL); int latency = (t2.tv_sec - t.tv_sec) * 1000000 + (t2.tv_usec - t.tv_usec); printf("cost %d\n", latency);
这段代码需要20us,空载的延迟这么高吗
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
仅仅测试单个耗时极短的函数开销意义不大,毕竟gettimeofday也是有开销的。可以循环运行百万次、千万次以使误差更小。
可以加个vx聊聊吗
No branches or pull requests
这段代码需要20us,空载的延迟这么高吗
The text was updated successfully, but these errors were encountered: