为 Android 模拟单声道 CPU 使用情况 [英] simulate cpu usage in mono for Android

查看:17
本文介绍了为 Android 模拟单声道 CPU 使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为 android(Android+c#.net) 编写一个单声道应用程序,以模拟特定持续时间(例如:30%、50%、70%)的稳定 CPU 使用情况,持续 2 秒.我参考了下面的链接模拟稳定的 CPU 负载和峰值在这里,我可以稳定系统 CPU,但在 Android 操作系统中无法执行相同的操作.任何帮助都会有所帮助.

I need to write an application in mono for android(Android+c#.net) to simulate steady cpu usage for certain duration(eg:30%,50%,70%) for 2 sec. I refered below link Simulate steady CPU load and spikes here i can able to steady the system cpu but the same operation not able to do in Android os. Any help can be helpful.

提前致谢.

推荐答案

我制作了一个示例项目,它似乎在我的三星 Galaxy S2 和模拟器上运行良好.

I made a sample project which seems to work fine on my Samsung Galaxy S2 and in the Emulator.

https://github.com/Cheesebaron/MonoDroid.CPULoader

它只使用您链接的资源.

It just uses the resources you linked to.

这篇关于为 Android 模拟单声道 CPU 使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆