Page 1 of 1

Time Stamp

Posted: Fri Aug 28, 2009 10:33 am
by tmwilliams
I'm wondering if there's some way I can get NEURON to return a time stamp when I'm running a simulation. Thanks!

Re: Time Stamp

Posted: Sat Aug 29, 2009 1:23 pm
by ted
By "time stamp" do you mean an indicator of progress? If so, do you mean "value of t"?

Re: Time Stamp

Posted: Tue Jul 27, 2010 11:55 pm
by psychic
I'm interested in getting the current real time.
I tried pc.time() but that did not work. I need to calculate the real it takes to run a simulation.
Also I run simulations and start reading news and impulse buy from Amazon, so how can I make play a sound at the end of the simulation?

Re: Time Stamp

Posted: Wed Jul 28, 2010 12:22 am
by ted
psychic wrote:I'm interested in getting the current real time.
I tried pc.time() but that did not work. I need to calculate the real it takes to run a simulation.
You don't need the "current real time." You only need a stopwatch function. Read about startsw()
http://www.neuron.yale.edu/neuron/stati ... ml#startsw
Also I run simulations and start reading news and impulse buy from Amazon, so how can I make play a sound at the end of the simulation?
This used to work, I think, but it doesn't do anything on my 1 year old desktop machine--

Code: Select all

CTRLG = 7 // ASCII code for ^G or "bell" character
strdef foo
sprint(foo,"%c",CTRLG)
print foo
Depending on your OS, you might be able to create a shell script that would run your program, then after the end of program execution, echo the bell character or cause a sound file to be played.