Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: timer.remove - Function Up: timer - Tool Previous: timer - Tool


timer.execute - Function



Package utility
Module misc
Tool timer


execute a function periodically


Synopsis
execute(callback, interval, oneshot)


Description
execute takes a function which you supply (a ``callback''), and executes it one or more times after a time that you specify has passed. The function returns a string, which you can use in the remove function to deactivate execution of the function.

The callback function you supply must take two arguments, which will be passed to the function when it is called by timer.

interval
The time interval that was supplied to execute().
name
The name of the timing event, i.e., the value returned by execute().
Often the callback will just ignore these arguments

You can specify that the function is to be executed only once (``oneshot''), or ``forever'' (until deactivated with remove).



Arguments

callback   function to be executed
    Allowed: two-argument function
interval   how long to wait before executing function (seconds)
    Allowed: float
    Default: 60
oneshot   execute function once only?
    Allowed: boolean
    Default: T


Returns
string identifier, for remove, or fail




next up previous contents index
Next: timer.remove - Function Up: timer - Tool Previous: timer - Tool   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15