gotty/js/spice-web-client/swcanvas/benchmark.html
Soren L. Hansen c66ae7b2e4 First, primitive stab at SPiCE integration
Launch an Xspice and run:
echo -ne "\033]844;127.0.0.1;9876\007"

This will launch a SPiCE client connecting to 127.0.0.1:9876.

Still need to add all the security stuff and generally be
more defensive in the implementation.
2021-04-16 06:50:05 -07:00

31 lines
897 B
HTML

<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
$( window ).load(function() {
var canvas = $('#cnv')[0];
var ctx = canvas.getContext('2d');
var loops = 0;
var startTime = +Date.now();
function drawRect() {
setTimeout(function() {
//ctx.fillStyle = '#FF0000';
//ctx.fillRect(100, 100, 100, 100);
loops++;
if(loops < 1000) {
drawRect();
} else {
var endTime = +Date.now();
alert(endTime-startTime);
}
}, 0);
};
drawRect();
});
</script>
</head>
<body>
<canvas id="cnv" width="300" height="300"></canvas>
</body>
</html>