Added a console task that loads timebase into irb
[timebase.git] / java / timebase_ext.rb
blob13d436ad6b9c9567a524504a5fcebb23bc8cde1d
1 require "java"
3 class TimeBase
4   # Platform:: java
5   class JavaClock < TimeBase
6     def initialize
7       @sys = java.lang.System
8     end
10     # Implemented with java.lang.System.nanoTime()
11     # 
12     # See: TimeBase::Clock#current_time
13     def current_time
14       @sys.nanoTime()
15     end
16   end
17 end