Time.sleep(0.0125)在Linux中不可用 [英] Time.sleep(0.0125) not available within Linux

查看:101
本文介绍了Time.sleep(0.0125)在Linux中不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

To All,

我想知道是否有人遇到过不允许的问题

在Linux下运行的Python脚本中有以下内容:


time.sleep(0.0125)


似乎我不允许对象睡眠。有没有人

过去之前遇到过这个特定的问题?

谢谢你,

David Blubaugh




此电子邮件传输包含保密信息,可能是特权的
。它仅适用于上面提到的收件人。如果您错误地收到此电子邮件,请不要以任何方式阅读,复制或传播。

如果您不是预期收件人,则禁止披露,复制,分发或使用此信息的内容。请立即回复

消息,告知发件人该消息是错误的。

回复后,请将其从您的计算机系统中删除。非常感谢您在

纠正此错误的帮助。

解决方案

2008-09-23,Blubaugh ,David A.< db ******* @ belcan.comwrote:


我想知道是否有人遇到过不被允许的问题

在Linux下运行的Python脚本中包含以下内容:


time.sleep(0.0125)



不,我没有。而且我怀疑其他人有没有。


似乎我不允许让对象睡眠。



这对我来说不是那样的。小心解释你是如何得出这个结论的?


有没有人在过去之前遇到过这个特定的问题?


python

Python 2.5.2(r252:60911,2008年8月28日,15:54:48)

[GCC 4.1.2(Gentoo 4.1.2 p1.1)] on linux2

输入help,copyright,credit等等。或许可证或更多

信息。


>>导入时间
time.sleep(0.0125)



上面的代码已经工作了,我记得很清楚(我认为
认为包括Python 1.4) 。


-

格兰特


在消息< __ ** ****************************@posted.usinterne t> ;,格兰特

Edwards写道:


2008-09-23,Blubaugh,David A.< db ******* @ belcan.comwrote:


>我想知道是否有人遇到过不允许的问题
在Linux下运行的Python脚本中有以下内容:

time.sleep( 0.0125)



不,我没有。我怀疑其他人有没有。



只是想一想,你的最小睡眠时间可能受到系统HZ的分辨率的限制。时钟。键入


less /proc/config.gz

并搜索CONFIG_HZ的值。设置。在Athlon 64

机器上我正在写这个,它是250,这应该允许睡眠间隔为
,间隔为0.004秒的倍数。 />


To All,
I was wondering if anyone has come across the issue of not being allowed
to have the following within a Python script operating under Linux:

time.sleep(0.0125)

It appears that I am not allowed to have the object sleep. Has anyone
encountered this specific issue before in the past?
Thank You,
David Blubaugh



This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named above. If you receive
this e-mail in error, please do not read, copy or disseminate it in any manner.
If you are not the intended recipient, any disclosure, copying, distribution or
use of the contents of this information is prohibited. Please reply to the
message immediately by informing the sender that the message was misdirected.
After replying, please erase it from your computer system. Your assistance in
correcting this error is appreciated.

解决方案

On 2008-09-23, Blubaugh, David A. <db*******@belcan.comwrote:

I was wondering if anyone has come across the issue of not being allowed
to have the following within a Python script operating under Linux:

time.sleep(0.0125)

No, I have not. And I doubt anybody else has.

It appears that I am not allowed to have the object sleep.

It doesn''t appear that way to me. Care to explain how you
arrived at that conclusion?

Has anyone encountered this specific issue before in the past?


python
Python 2.5.2 (r252:60911, Aug 28 2008, 15:54:48)
[GCC 4.1.2 (Gentoo 4.1.2 p1.1)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.

>>import time
time.sleep(0.0125)

The above code has worked as far back as I can recall (which I
think includes Python 1.4).

--
Grant


In message <__******************************@posted.usinterne t>, Grant
Edwards wrote:

On 2008-09-23, Blubaugh, David A. <db*******@belcan.comwrote:

>I was wondering if anyone has come across the issue of not being allowed
to have the following within a Python script operating under Linux:

time.sleep(0.0125)


No, I have not. And I doubt anybody else has.

Just a thought, your minimum sleep time is probably limited by the
resolution of the system "HZ" clock. Type

less /proc/config.gz

and search for the value of the "CONFIG_HZ" setting. On the Athlon 64
machine I''m using to write this, it''s 250, which should allow for sleep
intervals in multiples of 0.004 seconds.


这篇关于Time.sleep(0.0125)在Linux中不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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