Grasshopper, output the 'time' each time an item is added to a list?

Hi All,

I’m doing some research on optimization and I want to output the time each value comes in at so I can see how long the algorithm has run for and at what time values are outputted at.

I’m currently using Karamba to output deflection and the data recorder to get all of the values into a list. I’ve tried to get the time from using time component with a timer however I can never get them to align.

I thought having each time the list length increases to output the time and data record that, but my python isn’t that good.
Id prefer having two separate lists, one for time and the other deflection, as long as the values align.

Any thoughts?

Thanks

If you plug the text “now” into a date/time parameter you’ll get the current time. Then use a data recorder to keep those times. Problem is expiring the date/time parameter when your karamba values change. Perhaps an evaluate component with a bogus input will do?

I am currently using the ‘now’ time perimeter and data recorder, however the problem is that I may get multiple outputs per second so I need it each time a ‘new’ value is added to the list (can be the same value as previous values), that it records the time at that moment.

I’m not sure what you mean by using an evaluate component with a bogus input?

The ‘update’ input of the Evaluate object isn’t used in the expression, but it will cause the expression to reevaluate. So whenever the slider changes (once an hour, 50 times a second, doesn’t matter), you’ll get a new time record.

Thanks for the he!p.