Deferring a function call

I'm writing a simple simulator, and I want to schedule an action to occur at a later time. Basically, at some later point I want to call a function f(a, b, c). But the values of a, b and c are determined at the current time.

One way way to do this is to keep a list of entries of the form [[TIME, FN, ARGS]...] and at simulated time TIME do: apply(FN, ARGS)
Aside from the fact that apply is deprecated, it seems like there should be a cleaner (possibly more Pythonic) way to do this. Ideas?



Relevant Pages

  • Exception Handling and Refactoring Question ...
    ... I am writing a simulation package in C++, and so far I've written about ... for now (for the simulator base development), ... I am considering refactoring my code to use try-catch type exception ... (because I've read in many places that exception handling ...
  • End a procedure from a different procedure
    ... Hey guys, I'm writing a simulator that uses about a dozen different ... compiler to a different procedure. ...
  • Re: MIPS simulator
    ... > to write it myself but i'm totally new to this feild. ... time effective for you to write your own simulator, ... This could be a much larger project than just writing a profiler ...
  • Re: [software] new controllable simulator
    ... much more engaging than a "passive" simulator. ... Thanks so much for writing that and posting. ... I even get a bit of that rush that I get when I land a nice siteswap in real life. ...
  • Suppressing output of keystrokes to console
    ... I am writing a program in C that has a login screen and i would like ... for the password to not display on the screen as it is being typed. ... am doing it from within the 'Nachos' OS simulator so if there is a ... program to compile when i include certain files like. ...