Help with a function to return the 'age' of itself
- To: mathgroup at smc.vnet.net
- Subject: [mg61392] Help with a function to return the 'age' of itself
- From: "heycarnut" <heycarnut at gmail.com>
- Date: Tue, 18 Oct 2005 02:44:33 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I'm trying to create a function, that when instantiated, keeps a 'copy'
of say the current absolute time, but when the instance is called, it
returns the delta between this 'copy' of the time and the current
absolute time. I have done this:
In[47]:= tt:=Hold[AbsoluteTime[]]-AbsoluteTime[];
y=tt;
N[Release[y]]
Pause[10]
N[Release[y]]
Out[49]=0.
Out[51]=10.
But I don't want to have to do an explicit release, i'd like to just be
able to evaluate y, in this case, and get the current value.
Help?
Thanks in advance,
Rob
- Follow-Ups:
- Re: Help with a function to return the 'age' of itself
- From: "Carl K. Woll" <carl@woll2woll.com>
- Re: Help with a function to return the 'age' of itself