GetTime for array values


BeeHay

Recommended Posts

I have recently been messing with two arrays, and am having some problems with some of the time aspects of moving the arrayed data...

say this is my code...

if(this...)
  Array2.AddValue(Array1[0])
  Array1.RemoveAt(0)
endif

... and I use GetTime(Array2[0])

The time shown is still the time of when the value was added to Array1, when what I want is the time it was added to Array2...

Any pointers would be great!

Thanks!

Link to comment
Share on other sites

Thats because the time gets tracked through. Once a time is associated with a value it tends to stay with the value. This is usually what you want, but when you don't, as in your case, you can use the inserttime() function to put whatever time you want:

Array2.AddValue(InsertTime(Array1[0],systime(),-1))

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.