<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,11 +10,10 @@ as any time spent in any instrumented methods invoked by the method.
 After leaving the top-most method, a call tree with timings is dumped
 to $stdout.
 
-Note: You aren't allowed to instrument methods on the Benchmark or
-String classes, or any object's #inspect method, because it can
-generate a recursive loop! For #fine-grained profiling on any
-arbitrary class, use profiler or ruby-prof instead. You're also
-not allowed to instrument an instrumented method.
+Note: You aren't allowed to instrument methods on the String class, or any
+object's #inspect method, because it can generate a recursive loop! For
+#fine-grained profiling on any arbitrary class, use profiler or ruby-prof
+instead. You're also not allowed to instrument an instrumented method.
 
 ## Example
 </diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,3 @@
-require 'benchmark'
-
 module Stickshift
   class &lt;&lt; self; attr_accessor :enabled, :top_level_trigger, :output; end
   @enabled = true
@@ -35,7 +33,7 @@ module Stickshift
       begin
         Timer.current = self
         result = nil
-        @elapsed = Benchmark.realtime do
+        @elapsed = realtime do
           result = block.call
         end
         result
@@ -45,6 +43,12 @@ module Stickshift
       end
     end
 
+    def realtime
+      start = Time.now
+      yield
+      Time.now - start
+    end
+
     def add(child)
       children &lt;&lt; child
     end
@@ -63,16 +67,20 @@ module Stickshift
     end
 
     def ms(t)
-      (t * 1000).to_i
+      (t * 1000)
     end
 
     def self_format
-      @self_format ||= @parent.self_format if @parent
-      @self_format ||= &quot;%#{total_time.to_s.length}s&quot;
+      @self_format ||= if @parent
+        @parent.self_format
+      else
+        width = (&quot;%0.2f&quot; % total_time).length
+        &quot;%#{width}.2f&quot;
+      end
     end
 
     def self_time
-      @self_time ||= ms(elapsed - children.inject(0) {|sum,el| sum += el.elapsed}).to_s
+      @self_time ||= ms(elapsed - children.inject(0) {|sum,el| sum += el.elapsed})
     end
 
     def total_time
@@ -105,7 +113,7 @@ class Module
     end
   end
 
-  RESTRICTED_CLASSES = [String, (class &lt;&lt; Benchmark; self; end), Benchmark]
+  RESTRICTED_CLASSES = [String]
   RESTRICTED_METHODS = %w(inspect __send__ __id__)
 
   def instrumented?(meth)</diff>
      <filename>lib/stickshift.rb</filename>
    </modified>
    <modified>
      <diff>@@ -154,9 +154,5 @@ class StickshiftTest &lt; Test::Unit::TestCase
   def test_cannot_instrument_string_or_benchmark_methods
     String.instrument :to_s
     assert !String.instance_methods.include?(instrumented_name(:to_s))
-    assert ! class &lt;&lt; Benchmark;
-      instrument :realtime
-      self.instance_methods.include?(TestHelper::instrumented_name(:realtime))
-    end
   end
 end</diff>
      <filename>test/test_stickshift.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5d9fb3d7e0c07f4a112fbe95c32cf5540034564f</id>
    </parent>
  </parents>
  <author>
    <name>Nick Sieger</name>
    <email>nick@nicksieger.com</email>
  </author>
  <url>http://github.com/nicksieger/stickshift/commit/f758989271990f182c8cf2d9e900766f188ad748</url>
  <id>f758989271990f182c8cf2d9e900766f188ad748</id>
  <committed-date>2008-08-13T12:36:13-07:00</committed-date>
  <authored-date>2008-08-13T12:36:13-07:00</authored-date>
  <message>Get rid of Benchmark.realtime to get sub-millisecond timings, and display
milliseconds as a float value.</message>
  <tree>86d6a1cd56af744469763d5cf24159e74e1dd831</tree>
  <committer>
    <name>Nick Sieger</name>
    <email>nick@nicksieger.com</email>
  </committer>
</commit>
