LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-12-2012, 02:01 PM   #1
markseger
Member
 
Registered: Jul 2003
Posts: 244

Rep: Reputation: 26
High resolution timers in python?


I'm brand new to python and am trying out how to do some of the real basic things I've been doing in perl for years. one of those is the ability to set up a recurring alarm at the usec level. I usually sleep for a second but by being able to specify the time in usecs I get tremendous accuracy and can literally synchronize events across hundreds of different nodes.

In any event, while I can find a call to see up such a timer it only takes an argument in seconds, not usec. I've gotta believe such a timer exists, but I have not been able to find one.

the one I found is signal.alarm() and giving something other than an integer yields:

./run.py:33: DeprecationWarning: integer argument expected, got float
signal.alarm(.5)

-mark
-mark
 
Old 01-12-2012, 03:35 PM   #2
thesnow
Member
 
Registered: Nov 2010
Location: Minneapolis, MN
Distribution: Ubuntu, Red Hat, Mint
Posts: 172

Rep: Reputation: 56
time.sleep() takes floating point values, would that work?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
High Resolution Timers vahu002 Linux - Kernel 3 07-23-2009 10:13 AM
High Resolution Timers sachin_damle Linux - Kernel 1 07-28-2008 09:29 AM
High Resolution Timers sachin_damle Linux - General 1 07-23-2008 03:15 PM
High Resolution Timers swinchen Programming 2 07-22-2004 10:34 AM
High Resolution Timers snoopy42 Linux - General 2 12-10-2002 05:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration