[Gridflow-cvs] [svn] commit: r3534 - /trunk/base/main.rb

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Apr 15 21:53:46 EDT 2008


Author: matju
Date: Tue Apr 15 21:53:46 2008
New Revision: 3534

Log:
remove GridFlow.cpu_hertz, which was used by [fps], and now is in c++ for use by [tsctime] (which is in turn used by [fps], optionally)

Modified:
    trunk/base/main.rb

Modified: trunk/base/main.rb
==============================================================================
--- trunk/base/main.rb (original)
+++ trunk/base/main.rb Tue Apr 15 21:53:46 2008
@@ -44,7 +44,6 @@
 class<<self
 	attr_accessor :data_path
 	attr_reader :fobjects
-	attr_reader :cpu_hertz
 	attr_reader :subprocesses
 end
 
@@ -107,16 +106,6 @@
 	end
 end
 
-def GridFlow.estimate_cpu_clock
-	u0,t0=GridFlow.rdtsc,Time.new.to_f; sleep 0.01
-	u1,t1=GridFlow.rdtsc,Time.new.to_f; (u1-u0)/(t1-t0)
-end
-begin
-	@cpu_hertz = (0...3).map {GridFlow.estimate_cpu_clock}.sort[1] # median of three tries
-rescue Exception => e
-	GridFlow.post e,e.backtrace
-end
-
 def GridFlow.find_file s
 	s=s.to_s
 	if s==File.basename(s) then



More information about the Gridflow-cvs mailing list