lib/nike_plus/activity.rb
# Return activity duration in the form HH:MM:SS. 
Return activity duration in the form HH:MM:SS.
Return activity duration in the form HH : MM : SS .
def time
      a=[1, 1000, 60000, 3600000]*2
      ms = duration
      "%02d" % (ms / a[3]).to_s << ":" << 
      "%02d" % (ms % a[3] / a[2]).to_s << ":" << 
      "%02d" % (ms % a[2] / a[1]).to_s 
    end
def time a = [ 1 , 1000 , 60000 , 3600000 ] * 2 ms = duration "%02d" % ( ms / a [ 3 ] ) . to_s << ":" << "%02d" % ( ms % a [ 3 ] / a [ 2 ] ) . to_s << ":" << "%02d" % ( ms % a [ 2 ] / a [ 1 ] ) . to_s end
Return activity duration in the form HH:MM:SS.
Return activity duration in the form HH : MM : SS .
#<< "." <<  #"%03d" % (ms % a[1]).to_s