I wrote this to get page loads times but you should be able to use it to
accomplish what you are asking.
require 'date'
$start = DateTime.now
# process you want to time here...
$stop = DateTime.now
diff = $stop - $start
h,m,s,frac = Date.day_fraction_to_time(diff)
s += frac.to_f
File.open('C:\watir_bonus\working\pageSearchLoad_Times.txt', 'a+'){|d|
d.puts "Time to load page: " + "#{h} Hours, #{m} Minutes, #{s}
Seconds"}
Hope this helps,
--Mark
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mathew Jacob
Sent: Friday, March 16, 2007 5:32 AM
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: [Wtr-general] Calculating attachment uploading time
I want to calculate the attachment uploading time in one mail client.
How can I calculate this time. Help me in this scenario
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general