Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# requires "isightcapture" in the cwd (http://www.intergalactic.de/pages/iSight.html)
INTERVAL = 20
@t1 = Time.now - INTERVAL
while true
@t2 = Time.now
if @t2 - @t1 >= INTERVAL
@t1 = @t2
system "./isightcapture #{@t1.strftime("%Y%m%d%H%M%S")}.jpg &"
print "\n#{@t1}"
else
print "."
end
STDOUT.flush
sleep(1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment