Why does TimeUsed die?

*To*: mathgroup at smc.vnet.net*Subject*: [mg6391] Why does TimeUsed die?*From*: "C. Woll" <carlw at u.washington.edu>*Date*: Sun, 16 Mar 1997 19:25:00 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Hi all, Has anyone else experience this? I am using Mma 3.0 on a SGI, and I have a very complicated Mma program. Since I am interested in speed, I use Timing for major subroutines. Now, in the middle of one of my subroutines, the Timing function dies. That is, when the subroutine finishes, Timing says that it took Null seconds. Subsequently, when I try Timing anything else, I always get Null seconds. Moreover, I've traced the problem to TimeUsed. When I try TimeUsed[], Mma returns TimeUsed[], not a number. So, somehow, the function definiton for TimeUsed is being cleared. To get around this problem, I've written a function which does a TimeUsed[], the subroutine, and then another TimeUsed[] to find the time the subroutine takes. This works better, but isn't perfect. TimeUsed[] died on me again, and the output I got was TimeUsed[]-1650. Subsequently, the output returned is 0, since TimeUsed[]-TimeUsed[]=0. When I go to the operating system and check the status of my Kernel, ps returns how long my process has been running, so the information is still available. I suppose I could write some Mma code to interrogate the operating system for the time used. So, has anyone else experienced this, and does anyone know of a possible workaround? Thanks Carl Woll Dept of Physics U of Washington carlw at u.washington.edu