function for greatest object in list less than or equal to a value

Richard Gaskin ambassador at fourthworld.com
Mon Oct 12 13:41:12 EDT 2015


BNig wrote:

> BTW, what is a tick? Is that the imperial gallon of time? Or more a pint, a
> fluid ounce?
> I do kow that ticks bite and :)

In other programming languages a tick is often a counter within some 
larger timer framework.

In HyperTalk it was derived similarly, the default update rate for the 
early Mac OS vertical retrace subsystem.

Throughout HyperTalk's life it was the most granular expression of time 
the language supported, since millisecond support was introduced to the 
xTalk world by MetaCard in 1992.

The choice of tying the ticks to retrace was perhaps a necessity in 
early Mac OS systems, relying as they did on preemptive multitasking. 
But that reliance also made it an inexact quantity:  by default the 
vertical retrace would happen 60 times a second, but it was possible to 
have some processes run long enough to stall it a bit now and then.

But imprecise as it was it was all we had, so we used it.

Today both ticks and milliseconds are independent of the display 
subsystem on all platforms, and generally more reliable.

I migrated to milliseconds for benchmarking as soon as I became aware of 
them in MetaCard, since most routines are fast enough that the finer 
granularity is often useful.

If you need even finer granularity you can use "the long seconds", but 
with any of them it's helpful to keep in mind the consideration Mark 
Wieder reminds us of: modern multi-tasking systems can have throughput 
affected by a great many considerations beyond our control.

For this reason all benchmarks should be run multiple times with as few 
other processes running as practical, and even then their results should 
be taken with a grain of salt.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list