如何在C程序中我们每次都获得数据形式 [英] How in a C program we get data every time form ram

查看:74
本文介绍了如何在C程序中我们每次都获得数据形式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何从ram中获取数据以便慢速执行。在c语言中有任何方法我们都错过了每次缓存。我想尽可能慢地执行我的程序



我尝试了什么:



for(int i = 0; i> 0; i ++)

{

//此处慢速代码

}

How in c we get data every time from ram for slow execution.Is there any method in c Language we miss the Cache Every time.I want to Execute my program as slow as possible

What I have tried:

for(int i=0;i>0;i++)
{
//slow code here
}

推荐答案

引用:

我想尽可能慢地执行我的程序

I want to Execute my program as slow as possible

为什么?这是一个非常深奥的请求......



如果你想强制执行一个慢,唯一可行的方法是使用操作系统来放慢你的线程睡觉的任务,无论是在你的循环内还是代替它。你究竟是怎么做的我们不能说,因为它会因目标系统而异 - 但首先要在编译器/ IDE的库文档中查找sleep。

Why? That's a pretty esoteric request...

If you want to force a slow execution, the only practical way is to use the operating system to slow your thread down by putting the task to sleep, either inside your loop or instead of it. Exactly how you do that we can't say, because it will vary from target system to system - but start by looking for "sleep" in the library documentation for your compiler / IDE.


这篇关于如何在C程序中我们每次都获得数据形式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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