Reimplement #1652 - switchable time formats#1985
Conversation
The display format on the decks can now be configured. Implement alternative display based on kiloseconds.
Fix comments regarding style. Also add hectosecond formatting. For mixing, 100 seconds is actually a quite useful seperator.
rename formatSeconds into formatTime to reflect function better.
|
LGTM, waiting for CI |
|
There is still some work to do on this. Is there a way for me to push to this PR? Also, the tests you said were failing - how do you run those? |
|
You can issue a new pull request against this branch in my daschuer/mixxx repro. You can run the test on Linux by starting The verify debug assert was wrong because we use it only for conditions that never happens. But it happens at least during the test. I am not sure if it happens during Mixxx with faulty tracks for example. |
|
You can get this by: |
|
@benis: Is it possible to finish this by the end of January? |
|
I would hope to have this done by the end of January for sure. I've just created a PR to your hectoseconds branch with the change for Traditional (Coarse) time format. |
|
Just ran the tests, if I've understood the output correctly they now pass. |
|
Formating: Seconds ss,sss.ss For the hh: I think a minute only format is also common. A movie runtime is given as 98 min for example. So we can pick IMHO that and drop the hh: entirely. |
|
I don't think your examples match up with SI. The SI standard says that decimal places can be separated by a point or a comma (the former in US), and that the thousand separator should be a space. That makes sense to me, could we also use it as the hundred separator in the hectoseconds format? |
The choice of variable names for separator characters (both 'group' separator characters and decimal separator), as well as the actual application of formatting, was inconsistent and confusing. Now it's better, hopefully.
I still don't think that's consistent with SI, but feel free to change it. |
Additional minor fixes
I can do this. Why do you think my proposal is not SI? |
|
https://en.wikipedia.org/wiki/International_System_of_Units#General_rules
So spaces for thousands, point or comma for decimal marker. You're proposing to do the opposite. |
| class DurationBase { | ||
|
|
||
| public: | ||
|
|
There was a problem hiding this comment.
I seem to have introduced this empty line in error.
I read this like this: 1 hs = 1 min + 40 s |
|
Ah, I see where you're coming from now, sorry for the confusion. Are you happy to change it? It will be less faff than me submitting another PR to you. |
|
OK I will do the change, I am only unsure about hecto seconds. |
|
I vote for the second one. It's kind of an unconventional format so why not. |
|
OK, done. However, I have just played with it and it feels odd. Or should we reintroduce your original hectoseconds format? |
|
I'm not attached to the hectoseconds format, so I wouldn't mind if we replaced it. I think your suggestion is a better choice and more likely to get used. |
|
OK I will change it. |
…o hard to read and the new long format is basically the same but with other separators
|
Done. What else is missing before merge? |
|
I think that's everything. I inadvertently introduced a blank line in src/util/duration.h (:17) so I guess this would be a good time to fix that, but otherwise this is good to go. |
|
OK, I am fine with this now. @uklotzde Is anything left to do before merge? |
|
OK time to merge this. |

This is a rebased Version of #1915 onto the original #1652
to keep the original commit messages.