I'm I alone in thinking the new timer app UI sucks? The old app where it used a spinner to set an alerm time and where I had N alarms that I could edit was simple and easy to use. The new app where hour and minutes are separate text fields and where you can't edit an alarm you can only delete old ones and create new ones is utterly unintuitive to me and much slower and more error prone than the old one. Clicking in t…
Why the iPhone Timer app displays a fake time
61–70 of 83 posts
Re: Why the iPhone Timer app displays a fake time
#62I've never seen something so confusing. I've been (and quite frankly still am) seriously considering this is a big prank that's going over my head. The author even mentions that because time goes up and countdowns go down, rounding down is confusing. Wouldn't the logical conclusion be that you needed to round up? Wouldn't rounding up be the most logical option ANYWAY? If someone counts me down, I expect them to say "…
I have thought about your and other peoples comments. It could well be just rounded to the nearest integer, making my +500ms assumption wrong. However, this would result in 59.51s being displayed as 0:60, though it should be 1:00. Rounding up has the same problem.
I went through the same assumptions coding my own timer. Let's just round everything. But this resulted in 51.0s being displayed as 1:51 on the timer, with rounding up it's even worse resulting in 1:01:51. So at least hours and minutes have to be rounded down. But that makes it even more confusing that seconds are NOT Math.floor().
So in the end I "gave up" and used the date-fns package (works great) but it also rounds everything down. That's why I believe that iOS adds 500ms so the minutes and hours work properly.
Re: Why the iPhone Timer app displays a fake time
#63Earlier quoted context omitted.
But this highlights the difference between the two devices, stopwatches and timers. A stopwatch counts up. Therefore, it makes sense to use the floor (4.99 is still "4", not yet "5"). A timer counts down. Therefore, it makes sense to use the ceiling (3.01 is still "4", not yet "3"). In fact this was a turning point in the original article: "rounding down . . . makes a lot of sense when counting up. . . . But for a co…
Yup, that was my motivation for rewriting the parent statement. Abstracting away the type of counter and just saying, "show the number only when you crossed it" basically.
Re: Why the iPhone Timer app displays a fake time
#64I've never seen something so confusing. I've been (and quite frankly still am) seriously considering this is a big prank that's going over my head. The author even mentions that because time goes up and countdowns go down, rounding down is confusing. Wouldn't the logical conclusion be that you needed to round up? Wouldn't rounding up be the most logical option ANYWAY? If someone counts me down, I expect them to say "…
Original author here. I have thought about your and other peoples comments. It could well be just rounded to the nearest integer, making my +500ms assumption wrong. However, this would result in 59.51s being displayed as 0:60, though it should be 1:00. Rounding up has the same problem. I went through the same assumptions coding my own timer. Let's just round everything. But this resulted in 51.0s being displayed as 1…
They would round it up to 60, the format it to be 01:00.
Re: Why the iPhone Timer app displays a fake time
#65I've never seen something so confusing. I've been (and quite frankly still am) seriously considering this is a big prank that's going over my head. The author even mentions that because time goes up and countdowns go down, rounding down is confusing. Wouldn't the logical conclusion be that you needed to round up? Wouldn't rounding up be the most logical option ANYWAY? If someone counts me down, I expect them to say "…
Original author here. I have thought about your and other peoples comments. It could well be just rounded to the nearest integer, making my +500ms assumption wrong. However, this would result in 59.51s being displayed as 0:60, though it should be 1:00. Rounding up has the same problem. I went through the same assumptions coding my own timer. Let's just round everything. But this resulted in 51.0s being displayed as 1…
Surely one shouldn't round _after_ splitting the time into minutes and seconds.
You floor() or ceil() the time, depending on if you're counting up or down, to the lowest unit your timer is showing, then you display it and in the process split it into hours, minutes etc.
So ceil(59.51s) = 60s, which is then converted to 0h 1m 0s for display.
Re: Why the iPhone Timer app displays a fake time
#66Re: Why the iPhone Timer app displays a fake time
#67I've never seen something so confusing. I've been (and quite frankly still am) seriously considering this is a big prank that's going over my head. The author even mentions that because time goes up and countdowns go down, rounding down is confusing. Wouldn't the logical conclusion be that you needed to round up? Wouldn't rounding up be the most logical option ANYWAY? If someone counts me down, I expect them to say "…
Original author here. I have thought about your and other peoples comments. It could well be just rounded to the nearest integer, making my +500ms assumption wrong. However, this would result in 59.51s being displayed as 0:60, though it should be 1:00. Rounding up has the same problem. I went through the same assumptions coding my own timer. Let's just round everything. But this resulted in 51.0s being displayed as 1…
What?
> with rounding up it's even worse resulting in 1:01:51
Huh?
If you are making some kind of timer, you first should convert the time to pure seconds, or in whatever the smallest unit is that you care to deal with (milliseconds?). It is only at that point that the data is ready for any kind of arithmetic (for example, to subtract 1 second). Then, when you wish to display it, you first convert it.
For example, if the user sets your timer to 2 minutes, you would convert "2:00" to 120 seconds. Then you subtract 1 second. Now the internal value is 119. Then you convert back to the display format: "1:59". But be sure to keep "119" in some internal variable, for the next change.
document.forms.f.addEventListener('submit', function (ev) {
ev.preventDefault();
let f = ev.target,
s = Number(f.h.value * 60 * 60) +
Number(f.m.value * 60) +
Number(f.s.value);
function show(f, s) {
let h = Math.floor(s / 60 / 60);
s -= (h * 60 * 60);
let m = Math.floor(s / 60);
s -= (m * 60);
m = String(m).padStart(2, '0');
s = String(s).padStart(2, '0');
f.elements.r.value = [h, m, s].join(':');
}
show(f, s);
if (f.timer) { clearInterval(f.timer); }
f.timer = setInterval(function () {
if (0 === s) { clearInterval(f.timer); return; }
s -= 1;
show(f, s);
}, 1000);
});
Re: Why the iPhone Timer app displays a fake time
#68I'm I alone in thinking the new timer app UI sucks? The old app where it used a spinner to set an alerm time and where I had N alarms that I could edit was simple and easy to use. The new app where hour and minutes are separate text fields and where you can't edit an alarm you can only delete old ones and create new ones is utterly unintuitive to me and much slower and more error prone than the old one. Clicking in t…
Re: Why the iPhone Timer app displays a fake time
#69This gives me a nostalgic reminder of when I used to watch Nickelodeon GUTS. Whenever a countdown timed challenge was about to end, I would hear the audience count down starting with "10" at maybe 10.7 seconds, "9" at 9.7 seconds, etc. Then after "1", there was a small period of awkward silence and murmurs from the audience before the siren blasted. It's a good example of how measurement of time in terms of human per…
Re: Why the iPhone Timer app displays a fake time
#70Round half up is the typical expectation for most people in rounding to the nearest whole value. It isn't displaying a "fake" time, it's rounding. https://en.wikipedia.org/wiki/Rounding#Round_half_up Edit: Note, Round Half Up != Round half away from zero but that isn't important for this scenario :D
Round half up is a reasonable thing to do with many data types, but it's not something that's typically done with time. Any sensible time handling solution will truncate instead of rounding. Which is not to call apple's timer nonsensical. I agree with the author that it's a nicer experience, but I think it's likely an intentional decision to make the display look better, not a consequence of naive rounding.
You can
- Round (Truncation is a type of rounding, Rounding towards zero)
- Adjust the display to increase the precision it displays
- Do both by dynamically increasing the precision of the display/decreasing rounding as the distance to zero closes in.