Time Stamp

The basics of how to develop, test, and use models.
Post Reply
tmwilliams

Time Stamp

Post 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!
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Time Stamp

Post by ted »

By "time stamp" do you mean an indicator of progress? If so, do you mean "value of t"?
psychic
Posts: 3
Joined: Fri Apr 02, 2010 11:33 am

Re: Time Stamp

Post 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?
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Time Stamp

Post 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.
Post Reply