Santa Time : was: Time accuracy in browser

V

VK

Following the side thread about the time precision in browser at
<http://groups.google.com/group/comp...1/1ea06131c63cfdf0?hl=en#doc_620f160f0cb57c8c>


Statement:
At the very least Internet Explorer doesn't go by "real" time in script
methods. Instead it provides to script methods "application ticks" with
predefined amount of milliseconds in them. If the requested time frame
fits into an even amount of ticks then the script goes closer to the
real time flow. If the requested time frame doesn't fit into an even
amount of ticks then the closest even amoount of ticks is used instead.
As the result script will fall behind or rush forward relative to the
real time on each loop.

Experiment:
copy and paste code at the bottom
also this page can be found at
<http://www.geocities.com/schools_ring/SantaTime.html>

Both Red Santa and Blue Santa are set to move each 30ms
Red Santa (top) is moving using TRUESPEED interface - the only
interface to the real system time I've found so far.
Blue Santa (bottom) is moving w/o TRUESPEED interface, therefore its
30ms delay gets rounded to the closest "application tick" which is
bigger than 30ms

Expected Results:
Despite the same time delay set, Blue Santa will fall behind.

Results:
As expected

P.S. I have enough Santas and Snowmen for any further questions :)

P.P.S Because of proprietary <marquee> tag this test must be run under
Internet Explorer 4.x or higher.


<html>
<head>
<title>Santa's Time</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script type="text/javascript">

var Santa = '#define Santa_width 128\n#define Santa_height 128\nstatic
char Santa_bits[] = {\
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0xEC, 0x01,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x60, 0x03,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x25, 0x0F,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x04, 0x00, 0x00, 0x15, 0x11,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x1F, 0x02,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x3C, 0x7E, 0x43,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x1F, 0x80, 0x83,
0x07, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0F, 0xE0, 0x83,
0x1C, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x07, 0x90, 0xC5,
0x20, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x5F, 0x7E,
0x40, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0x04, 0x0C,
0x80, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x83, 0x42, 0x0C,
0x00, 0x01, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x83, 0x81, 0xFA,
0x00, 0x02, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x81, 0x81, 0x41,
0x01, 0x0E, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xDF, 0x41, 0x08, 0x43,
0x02, 0x3E, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0xFC, 0x41, 0x00, 0x64,
0x06, 0x7E, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x21, 0x00, 0x3C,
0x04, 0xFF, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x80, 0x07,
0x04, 0xFF, 0x01, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xE0, 0x80, 0x03,
0x86, 0xFF, 0x01, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xE0, 0x3F, 0x00,
0xC6, 0xFF, 0x03, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xCF, 0x00, 0xF8,
0xFF, 0xFF, 0x07, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x87, 0x01, 0xE4,
0xF1, 0xFF, 0x07, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xFF, 0x77,
0xE0, 0xFF, 0x0F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xFE, 0x73,
0xE0, 0xFF, 0x0F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xF0, 0x63,
0xC0, 0xFF, 0x0F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x0F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x1F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x1F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x1F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x06, 0x38, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x1F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x0E, 0xC0, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x1F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x07, 0xFC, 0xFF, 0xFE, 0x01, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x1F, 0x00, \
0x00, 0x00, 0x00, 0x80, 0x01, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0x0F, 0x00, \
0x00, 0x00, 0x00, 0x80, 0xC0, 0xFF, 0x3F, 0xFF, 0x1F, 0x00, 0x00, 0x00,
0xE0, 0xFF, 0x0F, 0x00, \
0x00, 0x00, 0x00, 0xC0, 0xC0, 0xFF, 0x1F, 0xFF, 0x7F, 0x00, 0x00, 0x00,
0xE0, 0xFF, 0x0F, 0x00, \
0x00, 0x00, 0x70, 0xE0, 0xE0, 0xFF, 0x9F, 0xFF, 0xFF, 0x00, 0x00, 0x00,
0xF0, 0xFF, 0x07, 0x00, \
0x00, 0x00, 0x70, 0x60, 0xE0, 0xFF, 0x8F, 0xFF, 0xFF, 0x1F, 0x00, 0x00,
0xF8, 0xFF, 0x07, 0x00, \
0x00, 0x00, 0x10, 0x30, 0xF0, 0xFF, 0x8F, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0xFC, 0xFF, 0x03, 0x00, \
0x00, 0xE0, 0x91, 0x10, 0xF0, 0xFF, 0x87, 0xFF, 0xFF, 0xFF, 0x1F, 0xC0,
0xFF, 0xFF, 0x00, 0x00, \
0x00, 0xFC, 0x1F, 0x10, 0xF0, 0xFF, 0x87, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x7F, 0x00, 0x00, \
0x00, 0x0C, 0x00, 0x11, 0xF0, 0xFF, 0x87, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x1F, 0x00, 0x00, \
0x00, 0x06, 0x00, 0x10, 0xF0, 0xFF, 0x83, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x01, 0x00, 0x00, \
0x00, 0x42, 0x00, 0x1A, 0xF0, 0xFF, 0x83, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x00, 0x00, \
0x00, 0xFE, 0x00, 0x0A, 0xF0, 0xFF, 0x83, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x00, 0x00, \
0x00, 0x80, 0x01, 0x08, 0xF0, 0xFF, 0x83, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x00, 0x00, \
0x00, 0x80, 0x01, 0x0C, 0xF0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x01, 0x08, 0xF0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x03, 0x08, 0xF0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x03, 0x08, 0xF0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x03, 0x08, 0xF0, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x20, 0x00, \
0x00, 0x00, 0x06, 0x18, 0xF0, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0x00, 0x60, 0x00, \
0x00, 0x00, 0x04, 0x10, 0xE0, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x07, 0xE0, 0xE3, 0x00, \
0x00, 0x00, 0x04, 0x10, 0xE0, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,
0x83, 0x3F, 0xF7, 0x01, \
0x00, 0x00, 0xE4, 0x1F, 0xE0, 0xFF, 0x0F, 0xFE, 0xFF, 0xFF, 0xFF, 0xDF,
0xC3, 0xF1, 0xF7, 0x00, \
0x00, 0x00, 0xFC, 0x3F, 0xE0, 0xFF, 0x0F, 0xFC, 0xFF, 0xFF, 0xFF, 0xBF,
0x41, 0xF0, 0x7F, 0x00, \
0x00, 0x00, 0xFC, 0x3F, 0xC0, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0x3F,
0xA1, 0xE8, 0x7F, 0x00, \
0x00, 0x00, 0xFC, 0x3F, 0xC0, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0xFF, 0x3F,
0xA2, 0xAD, 0x3F, 0x00, \
0x00, 0x00, 0xFE, 0x7F, 0xC0, 0xFF, 0x1F, 0xF0, 0xFF, 0xFF, 0xFF, 0x3F,
0x04, 0x26, 0xFF, 0x03, \
0x00, 0x00, 0xFE, 0x7F, 0xC0, 0xFF, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0x7F,
0x18, 0x24, 0xFF, 0x07, \
0x00, 0x00, 0xFE, 0xFF, 0x80, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0xFF, 0x7F,
0x90, 0xB3, 0xEF, 0x07, \
0x00, 0x00, 0xFE, 0xFF, 0x80, 0xFF, 0x7F, 0xC0, 0xFF, 0xFF, 0xFF, 0x7F,
0xE0, 0xF3, 0xDF, 0x05, \
0x00, 0x00, 0xFE, 0xFF, 0x00, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0x3F,
0x20, 0x68, 0x3E, 0x18, \
0x00, 0x00, 0xFE, 0xFF, 0x01, 0xFE, 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0x1F,
0x20, 0x64, 0x6C, 0x30, \
0x00, 0x00, 0xFC, 0xFF, 0x01, 0xFC, 0xFF, 0x03, 0xFC, 0xFF, 0xF9, 0x0F,
0x20, 0xF4, 0xC0, 0x20, \
0x00, 0x00, 0xFC, 0xFF, 0x03, 0xF8, 0xFF, 0x03, 0xF0, 0xFF, 0xF0, 0x07,
0x20, 0xB4, 0x81, 0x41, \
0x00, 0x00, 0xF8, 0xFF, 0x07, 0xF0, 0xFF, 0x0F, 0xE0, 0x7F, 0x3C, 0x00,
0x20, 0xB4, 0x83, 0xC3, \
0x00, 0x00, 0xF0, 0xFF, 0x0F, 0xE0, 0xFF, 0x1F, 0x00, 0x7E, 0xEC, 0x00,
0x20, 0x1C, 0x06, 0xFF, \
0x00, 0x00, 0xC0, 0xFF, 0x1F, 0x80, 0xFF, 0x3F, 0x00, 0x70, 0xD6, 0x01,
0x30, 0x18, 0x84, 0x87, \
0x00, 0x00, 0x80, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0x00, 0x30, 0x42, 0x07,
0x18, 0x18, 0xF8, 0x82, \
0x00, 0x00, 0x00, 0xFE, 0x3F, 0x00, 0xFC, 0xFF, 0x03, 0x30, 0x6E, 0xFE,
0x1F, 0x18, 0x10, 0x42, \
0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0xF8, 0xFF, 0x1F, 0x38, 0x67, 0xF8,
0x7F, 0x11, 0x18, 0x42, \
0x00, 0x00, 0x00, 0xE0, 0xFF, 0x00, 0xF0, 0xFF, 0xFF, 0x1F, 0x70, 0x00,
0xC0, 0x11, 0x18, 0x43, \
0x00, 0x00, 0x00, 0x80, 0xFF, 0x01, 0xC0, 0xFF, 0xFF, 0x1F, 0x5E, 0x00,
0x00, 0x32, 0x18, 0x43, \
0x00, 0x00, 0x00, 0x00, 0xFF, 0x07, 0x80, 0xFF, 0xFF, 0x8F, 0x4F, 0x00,
0x00, 0x6C, 0x08, 0x21, \
0x00, 0x00, 0x00, 0x00, 0xF0, 0x0F, 0x00, 0xFC, 0xFF, 0xFF, 0x67, 0x00,
0x00, 0x7C, 0x08, 0x21, \
0x00, 0x00, 0x00, 0x00, 0xC0, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x23, 0x00,
0x00, 0x80, 0x8C, 0x3F, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x00, 0x80, 0xFF, 0xFF, 0x11, 0x00,
0x00, 0x80, 0x85, 0x0F, \
0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xFC, 0x3F, 0x18, 0x00,
0x00, 0x00, 0x7F, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00,
0x00, 0x00, 0x06, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x0F, 0x00, 0xC0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x01, 0x38, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x07, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x88, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x48, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xC0, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD8, 0x3F, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, \
};\n';

</script>

<style type="text/css">
body {
background-color: #FFFFFF
}
span {
height: 128px;
width: 128px;
}
#Santa01 {
filter: progid:DXImageTransform.Microsoft.dropShadow(
Color=#FF0000,offX=2,offY=0,positive=true);
}
#Santa02 {
filter: progid:DXImageTransform.Microsoft.dropShadow(
Color=#0000FF,offX=2,offY=0,positive=true);
}
</style>

</head>

<body bgcolor="#FFFFFF">

<marquee direction="right" behavior="scroll"
scrollamount="5" scrolldelay="30"
TRUESPEED><span id="Santa01"><img
src="javascript:Santa"
width="128" height="128" vspace="0" hspace="0"
border="0"></span></marquee>

<marquee direction="right" behavior="scroll"
scrollamount="5" scrolldelay="30"
<span id="Santa02"><img
src="javascript:Santa"
width="128" height="128" vspace="0" hspace="0"
border="0"></span></marquee>

</body>
</html>
 
R

Randy Webb

VK said the following on 12/4/2005 1:40 PM:
Following the side thread about the time precision in browser at
<http://groups.google.com/group/comp...1/1ea06131c63cfdf0?hl=en#doc_620f160f0cb57c8c>


Statement:
At the very least Internet Explorer doesn't go by "real" time in script
methods. Instead it provides to script methods "application ticks" with
predefined amount of milliseconds in them. If the requested time frame
fits into an even amount of ticks then the script goes closer to the
real time flow. If the requested time frame doesn't fit into an even
amount of ticks then the closest even amoount of ticks is used instead.
As the result script will fall behind or rush forward relative to the
real time on each loop.

Experiment:
copy and paste code at the bottom

It doesn't work properly when copy/pasted.
also this page can be found at
<http://www.geocities.com/schools_ring/SantaTime.html>

Both Red Santa and Blue Santa are set to move each 30ms
Red Santa (top) is moving using TRUESPEED interface - the only
interface to the real system time I've found so far.

The TRUESPEED is an IE-ism that is not honored by Mozilla.
Blue Santa (bottom) is moving w/o TRUESPEED interface, therefore its
30ms delay gets rounded to the closest "application tick" which is
bigger than 30ms

You should test it in some other browser and see what the results are.
Expected Results:
Despite the same time delay set, Blue Santa will fall behind.

I only get two black santas but they move at the same speed.
Results:
As expected

P.S. I have enough Santas and Snowmen for any further questions :)

P.P.S Because of proprietary <marquee> tag this test must be run under
Internet Explorer 4.x or higher.

You should test the marquee tag in some other browsers before stating
that. It is not the marquee tag itself but the IE-only attribute of
TRUESPEED that causes it not to do what you want it to do in non-IE
browsers.
 
R

Richard Cornford

VK wrote:
Statement:
... . If the requested time frame fits into an even
amount of ticks then the script goes closer to the
real time flow. If the requested time frame doesn't
fit into an even amount of ticks then the closest even
amoount of ticks is used instead. ...

So what is so special about even numbers of ticks? Asserting that odd
ticks are skipped seems to lack evidence or reason. So much like most of
your statements.

<snip - more incoherent drivel unrelated to browser scripting or
javascript>

Richard.
 
D

Dr John Stockton

JRS: In article <[email protected]>
, dated Sun, 4 Dec 2005 10:40:22 local, seen in
news:comp.lang.javascript said:
Statement:
At the very least Internet Explorer doesn't go by "real" time in script
methods. Instead it provides to script methods "application ticks" with
predefined amount of milliseconds in them. If the requested time frame
fits into an even amount of ticks then the script goes closer to the
real time flow. If the requested time frame doesn't fit into an even
amount of ticks then the closest even amoount of ticks is used instead.
As the result script will fall behind or rush forward relative to the
real time on each loop.

If a "clock" is driven by setTimeout("...", constant), then obviously
the errors of consecutive calls will add, although they may be
correlated and the "clock" will not necessarily have the wrong rate.

If a "clock" is driven by setInterval("...", constant), the same
applies.

However, in the latter case the scheduler knows that a prolonged
sequence of constant intervals is called for and in the former case it
does not (though it could assume it) - so the behaviour might differ.

<FAQENTRY> Your code fails because you have allowed your posting agent
to wrap lines.</FAQENTRY>
 
V

VK

Richard said:
So what is so special about even numbers of ticks? Asserting that odd
ticks are skipped seems to lack evidence or reason. So much like most of
your statements.

Bad wording - I'm not a lawyer so some of my sentences may be read in
two ways *if you want to*.
The test case asserts that:

Application tick = 60ms - this is your minimum
Thusly
timeframe 30 ms => 60ms
timeframe 40 ms => 60ms
timeframe 59 ms => 60ms
timeframe 60 ms == 60ms
You put it into clearer wording if you want to (I guess "floating
point" should be involved)
<snip - more incoherent drivel unrelated to browser scripting or
javascript>

setTimeout(myFunction,30) == setTimeout(myFunction,40) ==
setTimeout(myFunction,50)

Of course: no any relations with scripting ;-)
 
V

VK

Dr said:
<FAQENTRY> Your code fails because you have allowed your posting agent
to wrap lines.</FAQENTRY>

Damn (aka Bloody) Google
1) wraps the lines
2) parses code to replace all "sometext@" to "...@"
3) parses code to replace all "sometext\" to "sometext"

These are only things I'm aware of. But the only possible answer on
this FAQ would be "Do not post using Google" - but such answer is not
always helpful.

I'm getting used to upload anything more or less complex to my site and
give a link in the post. But this raises security considerations (not
everyone will click a link w/o seeing the code it leads to). Also such
way is bad for legacy issues, because it is deadlink-prone in the
future. Not to say I'm posting some "keep forever" code here :) but
for the overall integrity of news archives it's bad I guess.
 
R

Richard Cornford

VK said:
Bad wording - I'm not a lawyer so some of my sentences
may be read in two ways *if you want to*.

Just two ways? One of the mane reasons you are not subject to even more
corrections than you already are is that much of what you write is so
incoherent that it is difficult to find any meaning in it at all, and so
are impossible to correct.
The test case asserts that:

You mean that HTML mark-up that used marquee elements?
Application tick = 60ms - this is your minimum

The default OS tick in Windows 95-98 is (very) approximately 60
milliseconds. Other OSs may have different opinions.
Thusly
timeframe 30 ms => 60ms
timeframe 40 ms => 60ms
timeframe 59 ms => 60ms
timeframe 60 ms == 60ms

And what is that supposed to mean?
You put it into clearer wording if you want to

I, and many others, already have.
(I guess "floating point" should be involved)

Guess-work is not the approach others take to programming, though it
would explain some of your writing and code.
setTimeout(myFunction,30) == setTimeout(myFunction,40) ==
setTimeout(myFunction,50)

Of course: no any relations with scripting ;-)

Did what you posted include a single scripted employment of -
setTimeout - (or the Date object)?

Richard.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sun, 4
Dec 2005 23:15:35 local, seen in Richard
Cornford said:
VK wrote:


So what is so special about even numbers of ticks? Asserting that odd
ticks are skipped seems to lack evidence or reason. So much like most of
your statements.

Remember that he's a foreigner, and cannot write real English; one must
not confuse illiteracy with stupidity, although they can be combined.
Less educated people sometimes use "even" to mean "integer". Another
reason why he's probably not Indian.
 
D

Dr John Stockton

JRS: In article <[email protected]>,
dated Sun, 4 Dec 2005 16:11:56 local, seen in
VK said:
Damn (aka Bloody) Google
1) wraps the lines

Google only wraps the lines if the author has used lines longer than
about 70 characters. Therefore, do not use lines longer than about 70
characters in material which will be posted via Google.

A proper system, like mine, will allow very long lines to be transmitted
and read unbroken.

<FAQENTRY>Include the Google-width number ??? </FAQENTRY>
 
V

VK

Dr said:

If you are wondering about the physiological statue of mine then I'm a
white bread. But as you remarkably noticed before (or did you not?)
this has nothing to do with mental capabilities of a person.

I'm indeed having troubles to deliver my message to a *selected group
of people* in this group. It is funny enough that I have no such
problems neither with regular visitors nor in daily communications I
have to conduct on my primary job. I guess it's all the question of the
attitude: does anyone wants to listen or does anyone wants to close her
ears.

My test is not valid because the test explanation can be read (if you
really want to) in another way... Wow... Poor Santas. :-(

If one really wanted to challenge the test (and not just being
stubbering paper-eater) then what would she do?

Open IE with <http://www.geocities.com/schools_ring/SantaTime.html> and
make it half-height of the screen.

Open FF with <http://www.geocities.com/schools_ring/SantaTime.html> and
make it half-height of the screen.

Arrange both windows so IE would be at the top and FF under and align
them by the left border.

The Red Santa in IE is guaranteed by producer to run with by truetime
intervals of 30ms.

All other Santas are running by the rounded application tick interval
which is higher than 30ms.

This way the Red Santa in IE must be the quickiest one in the team.

If he is then Dr. Stockton eats his hat.
If he's not then VK eats his hat.

To save Dr.Stockton's stomache I left some grammatical errors here and
where so one could dismiss the case without any experiments - just
because of a bad description.

;-)
 
A

Andrew Poulos

My test is not valid because the test explanation can be read (if you
really want to) in another way... Wow... Poor Santas. :-(

If one really wanted to challenge the test (and not just being
stubbering paper-eater) then what would she do?

IE 6 gives me an error that 'null' is null or not an object. Squares but
no Santas appear.

FF 1.5 gives a number of CSS errors and the js error that PUwin has no
properties. Two black Santas appear.

Andrew Poulos
 
V

VK

Dr said:
A proper system, like mine, will allow very long lines to be transmitted
and read unbroken.

It is not the problem of *input* - it is the problem of *output*.

The damage gets done while displaying the post in
<http://groups.google.com> so no client-side program may help.
 
V

VK

Andrew said:
IE 6 gives me an error that 'null' is null or not an object. Squares but
no Santas appear.

FF 1.5 gives a number of CSS errors and the js error that PUwin has no
properties. Two black Santas appear.

Please *do not use* the posed code from the newsgroup. Google breaks
the code and nothing I can do about it (at least not here as the image
data has to be as it is).

Use instead
<http://www.geocities.com/schools_ring/SantaTime.html> for running
example
or
<http://www.geocities.com/schools_ring/SantaTime.zip>
for zipped version w/o Yahoo! crap

Sure I could just use a linked Santa.gif or a colored box. But I wanted
Santa! :)

And also I wanted to use X Bitmap (XBM) image generation capabilities
over JavaScript.

X Bitmap over script is fully supported by IE 3.x and higher, Firefox
1.x and higher guaranteed. If you see boxes or errors then get the
exact copy from the posted links and try again.
If still fail please let me know your configuration. Maybe you are
running Mac OS? This is the only OS which doesn't have the prehistoric
xlib inside so cannot render XBM by default.
 
V

VK

Duncan said:
The empty box with a red border on IE is fastest on my system. Firefox
displays two black santas, IE displays two empty boxes. Shouldn't you be
worrying about getting your display correct before you worry about the
timing accuracy?

You mean like "You test failed because your Santa doesn't look like
Santa on my computer" ? That would be too much even for a purely
academical mind :-D

Don't you have some picture on your comp to use instead? Or just plain
text to scroll? You have the explanation how to conduct the test - you
can scroll whatever you want, it doesn't matter.

I personally wanted Santa and I got Santa :)
Also I wanted to use X Bitmap (XBM) graphics capabilities of
JavaScript.
The latter works guaranteed for IE 3.x and higher, Firefox 1.x and
higher under Windows 98 and higher.

If it doesn't work on your computer please take a clean copy from
<<http://www.geocities.com/schools_ring/SantaTime.zip> > (Google
damages the code and nothing I can do in this particular situation).
 
V

VK

Duncan said:
What does Google have to do with anything?

It has a lot of to do with different nasty srap happening with the
posted code. Like this one:
....
var nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp =
Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
....

If you look at this XPConnect code using Google Groups then
"[at_sign]mozilla.org/filepicker" will become
"[ellipsis].mozilla.org/filepicker" and obviously the code will not
work. If you look at the same post using a client-side newsreader then
the code will look as it should. This is just an example of many nasty
things Google does *before displaying* the post - thus client-side
settings will not help.

I clicked on the URL which you had posted in the message to which I was
replying:


that URL leads to an HTML page which does not display correctly on my copy
of IE (Version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519).

I guess no Santa to you this year :-(

Oh wait... out of my good heart get this one:
<http://www.geocities.com/schools_ring/ Santa.gif> :)

I guess it is correlated with SP2 installed and this "security fix":
<<http://xforce.iss.net/xforce/xfdb/15210>
(unless your installation is broken - would be greate to check on some
other IE under XP SP2)

It runs just fine under XP and XP SP1
 
R

Randy Webb

VK said the following on 12/7/2005 11:21 AM:
Duncan said:
What does Google have to do with anything?


It has a lot of to do with different nasty srap happening with the
posted code. Like this one:
....
var nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp =
Components.classes['@mozilla.org/filepicker;1'].createInstance(nsIFilePicker);
....

If you look at this XPConnect code using Google Groups then
"[at_sign]mozilla.org/filepicker" will become
"[ellipsis].mozilla.org/filepicker" and obviously the code will not
work. If you look at the same post using a client-side newsreader then
the code will look as it should. This is just an example of many nasty
things Google does *before displaying* the post - thus client-side
settings will not help.


I clicked on the URL which you had posted in the message to which I was
replying:



that URL leads to an HTML page which does not display correctly on my copy
of IE (Version 6.0.2900.2180.xpsp_sp2_gdr.050301-1519).


I guess no Santa to you this year :-(

Oh wait... out of my good heart get this one:
<http://www.geocities.com/schools_ring/ Santa.gif> :)

I guess it is correlated with SP2 installed and this "security fix":
<<http://xforce.iss.net/xforce/xfdb/15210>
(unless your installation is broken - would be greate to check on some
other IE under XP SP2)

It runs just fine under XP and XP SP1

Error: null is null or not an object
Line 70 character 2
XP SP2

Probably more related to IE killing the popup from Geocities and the
Geocities scripting breaking because it can't find the popup. You need a
better server.
 
V

VK

Duncan said:
the details of that particular security fix, but some of the
image security fixes were to do with images which didn't have the amount of
data declared by the header. Are you sure that you have exactly the right
number of bits to match your declared 128 pixel square?

An SP2 security fix coupled with a slightly bad image format is certainly
the most plausible explanation.

And for Randy, no the problem I'm seeing isn't to do with geocities popup
being blocked because I get the same effect downloading the zip file and
viewing it locally.

Indeed weird... May I ask for the last one service from you?

There is a difference between i) a real XBM image (some.xbm) and ii)
direct XBM data feed to C++ xlib module using JavaScript. To see if the
latter is supported on your machines could you visit and try to play
Wolfenstein shooter written on JavaScript / dynXBM at:
<http://www.wolf5k.com> (just press "Start Game")

And no, Santa is in the right format 128x128 = 16384 px = 2048 scan
lines (8bit each) = 2048 hex pairs (8bit per pair).
 
V

VK

!@#$% bastards! The next thing I guess they will block the browser from
displaying web-pages (for better security).

Thank you for your expertise.
 
T

Thomas 'PointedEars' Lahn

VK said:
It is not the problem of *input* - it is the problem of *output*.

No, it is not the problem of output. It would be displayed correctly with
Mr Stockton and me otherwise.
The damage gets done while displaying the post in
<http://groups.google.com>

No, it was done before. As you noticed, Google Groups wraps lines without
warning. When _posted_, as seen on enough occasions. Of course they are
then displayed as posted (read: wrapped) later.
so no client-side program may help.

After it was posted: true. Before or when posted: false.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top