Insert this statement at the end of your program:
Code: Select all
load_file("customrun.hoc")
Code: Select all
how_much_longer = 5 // or however many milliseconds the simulation should run
func keepgoing() {
// here you put your code that decides if the simulation should continue
if (your code decides that the simulation should continue) // this line is pseudocode
return 1
} else {
return 0
}
}
proc run() {
stdinit()
while (keepgoing()) {
continuerun(t + how_much_longer)
}
}