Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] FPS test utility

From: atruter::hih::com::au at: 17-Apr-2002 11:31

Too much spare time over the weekend ;) The following FPS test utility may be of interest to some . . . (In my case I used it to "Prove" that a faster clocked Celeron was slower than a higher bus bandwidth Pentium - confirming my gut feel about relative speeds under differing workflow conditions). <code> REBOL [] count: 100 do-test: func [label info /local img-size start end] [ img-size: to-pair label/text img: to-image layout [ origin 0 size img-size title green reform ["Testing" img-size ". . ."] ] view/new/options center-face layout [ origin 0 i: image img img/size effect [none] ] [no-title no-border] start: now/time/precise loop count [i/image: img show i] end: now/time/precise info/text: form to-integer count / (to-decimal end - start) show info unview ] view center-face layout [ across title "FPS Test" return la: label 100 "320x240" ia: info 100 return lb: label 100 "640x480" ib: info 100 return lc: label 100 "800x600" ic: info 100 return ld: label 100 "1024x768" id: info 100 return button "Run" [ do-test la ia do-test lb ib do-test lc ic do-test ld id ] button "Close" [quit] ] </code> Regards, Ashley *****************Privacy, Confidentiality & Liability Notice ************ This email is intended for the named recipient only. The information contained in this message may be confidential, or commercially sensitive. If you are not the intended recipient you must not reproduce or distribute any part of this email, disclose its contents to any other party, or take any action in reliance on it. If you have received this email in error, please contact the sender immediately. Please delete this message from your computer. You must scan this email and any attached files for viruses. The company accepts no liability for any loss, damage or consequence, whether caused by our own negligence or not, resulting directly or indirectly from the use of any attached files. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of the Company. **************************************************************************