Skip to main content
1-Visitor
July 25, 2012
Question

How can you calculate with time functions in Isodraw macros?

  • July 25, 2012
  • 1 reply
  • 1009 views

I'm trying to work out the number of seconds it takes for a macro to run.

I set two variables - time_start = ticks()

time_end = ticks()

To work out the total time in seconds I want to take away time_start from time_end (and divide by 60) but it gives an error.

Is this because they are strings?

If so, can they be converted to floats for the calculation? In a previous life, the ME10 macro language had a "val" function that would convert a string to a value (float I presume). Is there a way round it in IML?

1 reply

TimSharp1-VisitorAuthor
1-Visitor
July 25, 2012

I've answered my own question (I won't collect the points!)

If I declare the variables (including the result variable) as floats rather than strings, it seems to do the working out.