Yet Another Clock

Geoff Canyon geoff at runrev.com
Thu Jun 2 02:42:16 EDT 2005


On Jun 1, 2005, at 7:47 AM, Vjstbenz at aol.com wrote:

> cpu usage?
>
> are you actually saying.....that your simple clock face  
> program....when you first started out.....was taking 70% of a  
> windowsPC's cpu's power?..... as it merrilly ticked along?

No. I'm saying two things:

1. With Scott's method of drawing the clock by moving three images,  
it's possible to re-write the clock using move commands: one every  
minute for the seconds hand, one every hour for the minutes hand, and  
one every twelve hours for the hours hand. Each command would look  
something like this:

move image "hours" to the points of grc "_clock" in 12*3600 seconds  
without waiting

2. The problem is that slow move commands eat the CPU. Testing with  
just the seconds hand image took 70% of the CPU (mac, not pc) Rev is  
not particularly suited to graphics intensive applications beyond a  
certain requirement level.

gc


More information about the use-livecode mailing list