How to implement autonomous timer (for FRP)?

A

Aaron Leung

Hi everyone,

I want to take a shot at implementing a simple framework for functional
reactive programming in Python. (It will be loosely based on a paper I
read about a system called FrTime for DrScheme.) However, I'm not sure
how to go about implementing certain components.

One basic component will be an object representing the current time
(preferably down to, say, 10 ms). This time object should update
itself autonomously. Other objects which somehow depend on the time
object will be kept in a dependency graph, and automatically updated as
the time object updates itself.

I'm not sure what's the best way to implement this time object. I'm
guessing it should run in its own thread, and whenever it updates, it
should update the graph of its dependents in another thread. But
naturally I'd like the timer to be efficient and precise (again, down
to ~10 ms), and I'm not sure what my options are. I'd appreciate any
suggestions.

Thanks and regards,
Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top