Warning
This code must be run with nrniv -python and not directly via python. The better solution is to use Python's threading module which works regardless of how NEURON is launched.
Example:
from neuron import h def foo(): print 'Hello' timer = h.Timer(foo) timer.seconds(1) timer.start() # type timer.end() to end timer
interval = timer.seconds()
interval = timer.seconds(interval)