Microsoft
Software
Hardware
Network
Question : How to subtract times in Ruby 03/03/09 18:55:14 - 03/03/09 18:54:57
I have an app that needs to figure out the minutes a process takes and the log file looks something like this:
03/03/09 18:54:57 nsrd: savegroup info: starting _STD_INCR_FILERS (with 2 client(s))
03/03/09 18:55:14 nsrd: savegroup info: starting _STD_INCR (with 75 client(s))
I would like to do it in ruby.
Answer : How to subtract times in Ruby 03/03/09 18:55:14 - 03/03/09 18:54:57
now instead of puts date_s - date_e do
yada = date_e - date_s
puts (yada.to_f * 24).floor.to_s + " hours"
puts (yada.to_f * 24 * 60).modulo(60).floor.to_s + " minutes"
puts (yada.to_f * 24 * 60 * 60).modulo(60).floor.to_s + " seconds"
Random Solutions
Re-install an XP-Home "Upgrade" system (activation and WGA issues)?
OWA Error: HTTP/1.1 New Session Failed
Adobe PDF bookmark font is gibberish
Client Hanging - Error: Not found [8F07]
Matching data from two Worksheets, and highlighting matching rows
How to check if a sql job is running for a long time
poblem installing Magento - download phase
Internet Marketing: Paid Surveys : real or scam
How to create HTML email newsletter within outlook? Add-in?
Windows searches for PRORET.MSI