Skip to content

Instantly share code, notes, and snippets.

@jarmo
Created July 1, 2010 19:47
Show Gist options
  • Save jarmo/460456 to your computer and use it in GitHub Desktop.
Save jarmo/460456 to your computer and use it in GitHub Desktop.
require "benchmark"
require 'win32/screenshot'
t = "Internet Explorer"
Benchmark.bmbm do |x|
x.report("no file") {50.times {|i| Win32::Screenshot.window(t, 0) {|w, h, b| File.open("pic#{i}.bmp", "wb") {|f| f.puts b}}}}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment