File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 11build /
22node_modules /
3+ prebuilds /
Original file line number Diff line number Diff line change 1+ var robot = require ( "./index.js" ) ;
2+
3+
4+ var bmp = robot . screen . capture ( 0 , 0 , 500 , 500 ) ;
5+
6+ //bmp.save("./test.bmp");
7+ //
8+ // var start = process.hrtime();
9+ //
10+ // var elapsed_time = function(note)
11+ // {
12+ // var precision = 3; // 3 decimal places
13+ // var elapsed = process.hrtime(start)[1] / 1000000; // divide by a million to get nano to milli
14+ // console.log(process.hrtime(start)[0] + " s, " + elapsed.toFixed(precision) + " ms - " + note); // print message + time
15+ // start = process.hrtime(); // reset the timer
16+ // }
17+ //
18+ // for (var i = 1; i < 1000; i++)
19+ // {
20+ // testColorAt();
21+ // }
22+ //
23+ // function testColorAt()
24+ // {
25+ //
26+ // var bmp = robot.screen.capture(0,0, 500, 500);
27+ // //console.log(bmp.width);
28+ // //console.log(bmp.height);
29+ // //
30+ // console.log(bmp)
31+ // for (var x = 0; x < 1000; x++)
32+ // {
33+ // var hex = bmp.colorAt(2, 5);
34+ // }
35+ //
36+ // elapsed_time("colorAt #" + i);
37+ //
38+ // }
You can’t perform that action at this time.
0 commit comments