flashpolicyd.rb
# Returns an array of days, hrs, mins and seconds given a second figure
# The Ruby Way - Page 227
Returns an array of days, hrs, mins and seconds given a second figure
The Ruby Way - Page 227
Returns an array of days hrs mins and seconds given a second figure The Ruby Way - Page 227
def sec2dhms(secs)
  time = secs.round
  sec = time % 60
  time /= 60
  mins = time % 60
  time /= 60
  hrs = time % 24
  time /= 24
  days = time
  [days, hrs, mins, sec]
end
def sec2dhms ( secs ) time = secs . round sec = time % 60 time /= 60 mins = time % 60 time /= 60 hrs = time % 24 time /= 24 days = time [ days , hrs , mins , sec ] end
Returns an array of days, hrs, mins and seconds given a second figure
The Ruby Way - Page 227
Returns an array of days hrs mins and seconds given a second figure The Ruby Way - Page 227
secs
<not_specific>