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

Android network的获取疑问 #293

Open
ZhangNNai opened this issue Oct 15, 2024 · 4 comments
Open

Android network的获取疑问 #293

ZhangNNai opened this issue Oct 15, 2024 · 4 comments

Comments

@ZhangNNai
Copy link

版本:v2.9.3
为什么getAndroidNet方法里是time.sleep(0.5)。传输速率单位是kb/s,不是time.sleep(1)吗?

@rafa0128
Copy link
Member

版本:v2.9.3 为什么getAndroidNet方法里是time.sleep(0.5)。传输速率单位是kb/s,不是time.sleep(1)吗?

?这是流量,单位是KB

@rafa0128
Copy link
Member

这里获取的值原本是一个累计值,但是solox想拿的是某个时刻消耗的流量,所以尽量用短时间内前后两个累计值相减。1s也可以,但是为了加快获取速度,跟得上app的场景就用0.5s减少误差

@ZhangNNai
Copy link
Author

谢谢回复,那请教一下,怎么计算上传下载的速度呢

@rafa0128
Copy link
Member

谢谢回复,那请教一下,怎么计算上传下载的速度呢

这个当速率也没有问题,前端是按照每秒收集一次的,有的机器好一点间隔可能少于1秒,机器差的快于1秒

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