From: 7stud -- Date: 2009-09-03T13:43:01+09:00 Subject: Re: Threads - running something in background Alex Zunega wrote: > > I just want something to time these iteration (one per second, for > example), and everytime that I insert some "sleep" method, the Updater > would "sum 1" to @i only when I try to access @i attribute. > > What I expect, in other words, is to have an @i very close to the number > of seconds of the object life, just to prove that it works... You aren't making any sense. On the one hand, you say that you want @i to tell you the number of seconds the object has been "alive". On the other hand, you say you only want to add 1 to @i when you try to access @i. Which is it? -- Posted via http://www.ruby-forum.com/.