MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Help with a function to return the 'age' of itself

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61464] Re: Help with a function to return the 'age' of itself
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 19 Oct 2005 02:17:28 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <dj2662$b76$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and a global variable that is set when you define 
the function
does not help
$time = AbsoluteTime[]
useless[] := AbsoluteTime[] - $time

Table[Pause[1]; useless[], {4}]

??

Regards

  Jens

"heycarnut" <heycarnut at gmail.com> schrieb im 
Newsbeitrag news:dj2662$b76$1 at smc.vnet.net...
| 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
| 



  • Prev by Date: Re: Help with a function to return the 'age' of itself
  • Next by Date: Re: NestList
  • Previous by thread: Re: Help with a function to return the 'age' of itself
  • Next by thread: Bug with Limit, Series and ProductLog ?