Skip to content

Instantly share code, notes, and snippets.

@pope
Forked from ambethia/time_lapse.rb
Created August 20, 2009 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pope/171368 to your computer and use it in GitHub Desktop.
Save pope/171368 to your computer and use it in GitHub Desktop.
# requires "isightcapture" in the cwd (http://www.intergalactic.de/pages/iSight.html)
require "eventmachine"
INTERVAL = 20
EM::run do
timer = EM::PeriodicTimer.new(INTERVAL) do
time = Time.now.strftime("%Y%m%d%H%M%S")
system "./isightcapture #{time}.jpg &"
puts time
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment