consttest.frink

View or download consttest.frink in plain text format

println["\nRunning timing loops..."]

for iter = 1 to 5
{
   start = now[]

   // Timing
   limit = 1 million
   for i = 1 to limit
   {
      a = 2 feet + 3 meters
   }

   end = now[]
   println["Iteration $iter:"]
   println["The loop took " + (end - start -> seconds) + " seconds."]
   println["This is " + (limit / (end-start) -> s^-1) + " operations/sec."]
}


View or download consttest.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17591 days, 17 hours, 34 minutes ago.