Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline widths can be assigned "NaN%" #6

Closed
glacials opened this issue Nov 22, 2013 · 0 comments
Closed

Timeline widths can be assigned "NaN%" #6

glacials opened this issue Nov 22, 2013 · 0 comments
Labels
bug Issues that are solved by repairing functionality

Comments

@glacials
Copy link
Owner

If a WSplit run's final split has a finish time of 0 (i.e. the run was never completed) all segments of the timeline chart get a NaN% width.

This is because we obtain the total run time by looking at the final split's finish time. To get each timeline segment's width, we divide that split's duration by the total run time, which gives us a divide-by-zero error in this case.

This only happens for WSplit runs because SplitterZ and TST don't keep track of finish times, only durations, so for those we calculate them manually by summing individual split times.

Example: http://splits.io/F9X3

Pretty colors, but not quite accurate.

The simple fix is to calculate WSplit run times like we do for SplitterZ and TST, instead of depending on that last split's finish time.

However this also brings up an issue of whether or not to display the timeline chart as we currently are for incomplete runs, as its total width doesn't actually represent the duration of the game -- only the total duration of the completed runs. This might be something to think about later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that are solved by repairing functionality
Projects
None yet
Development

No branches or pull requests

1 participant