Skip to content

Commit

Permalink
add graph binary
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Jan 17, 2008
1 parent 204cd72 commit 98056e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/graph
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), *%w[.. lib]))

require 'glowstick'

graph = Glowstick::Graph.new

File.read("/Users/tom/mem.log").split("\n").each { |x| graph.add(x.to_i) }

Glowstick.new(nil).start
2 changes: 2 additions & 0 deletions lib/glowstick/glowstick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def keyboard(key, x, y)
end

def idle
return unless @handler.respond_to?(:idle)

should_draw = @handler.idle
if should_draw
glutPostRedisplay
Expand Down

0 comments on commit 98056e3

Please sign in to comment.