This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

timer is a C extension that provides a Timer class that operates similar to the threading module’s Timer factory. Provided a duration in microseconds and a callable, the timer can be constructed and started.:

>>> callback = lambda: print("Time up!")
>>> t = timer.Timer(1000000, callback) # One second timer
>>> t.start()
Time up!

Timer objects can also be constructed with optional arguments and keyword arguments to be passed to the callback.:

>>> def callback(*args, **kwargs):
...     print(args, kwargs)
...
>>> t = timer.Timer(1000000, callback, 1, 2, 3, hurf="durf")
>>> t.start()
(1, 2, 3) {'hurf': 'durf'}

Timer objects provide microsecond resolution when stopped. The value is returned from the stop method, and also available in the elapsed attribute.:

>>> t = timer.Timer(10000000, callback) # Ten second timer
>>> t.start()
>>> # Call stop after about three seconds
>>> t.stop()
3534569
>>> # Close enough, that's 3.534569 seconds
>>> t.elapsed
3534569

For an idea of how this works, check out the source code and/or read http://msdn.microsoft.com/en-us/magazine/cc163996.aspx. A number of Win32 APIs are used to supplement QueryPerformanceCounter to keep the timing high resolution and accurate.

This is fairly stable but doesn’t have a lot of tests and hasn’t been used all that much. I’ve tested it on Python 3.1 and backported it to work with Python 2.7. It probably works from other versions but I haven’t tried.

Development occurs at https://bitbucket.org/briancurtin/timer.

Release History

Release History

0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
timer-0.1.win32-py2.6.exe (207.0 kB) Copy SHA256 Checksum SHA256 2.6 Windows Installer Feb 17, 2011
timer-0.1.win32-py2.7.exe (207.0 kB) Copy SHA256 Checksum SHA256 2.7 Windows Installer Feb 17, 2011
timer-0.1.win32-py3.1.exe (207.0 kB) Copy SHA256 Checksum SHA256 3.1 Windows Installer Feb 17, 2011
timer-0.1.win32-py3.2.exe (207.0 kB) Copy SHA256 Checksum SHA256 3.2 Windows Installer Feb 17, 2011
timer-0.1.zip (9.9 kB) Copy SHA256 Checksum SHA256 Source Feb 16, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting