Skip to content

Commit

Permalink
Ensure the duration is always a float
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Mar 12, 2015
1 parent 46cadb3 commit 8c2c89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def signed_in?
next if activity_cutoff && a.start_time_utc < activity_cutoff

nike_activity = nike_client.activity(a.activity_id)
duration = nike_activity.duration / 1000
duration = nike_activity.duration / 1000.0

runkeeper_activity = {
type: 'Running',
Expand All @@ -104,7 +104,7 @@ def signed_in?
if a.gps && nike_activity.geo && nike_activity.geo.waypoints
index = -1
total = nike_activity.geo.waypoints.size
fraction = duration.to_f / total.to_f
fraction = duration / total
last_path = nil
last_delta = nil

Expand Down

0 comments on commit 8c2c89c

Please sign in to comment.