Skip to content

Conversation

@daniebker
Copy link

@daniebker daniebker commented Nov 7, 2025

A small change to add an hour selector to the timer countdown. I found only being able to set minutes too limiting and sometimes need timers that go longer than 1 hour.

Testing

I’ve tested this in InfiniSim and on the pinetime.

  1. Build and open up infinisim with this branch checked out
  2. Navigate to the timer app
  3. Expected you see H : M : S selectors, all on 0
  4. Set H to 1 M to 0 and S to 1
  5. Start the timer
  6. After ticking down the timer should tick down to 0:59:59
  7. Pause the timer.
  8. Set minutes to 50 and start the timer
  9. Expected previous functionality works as expected and there are no regresions.

I also have another change, unrelated to the timer, because I was having issues building the chrono on Mac.

  currentDateTime += std::chrono::seconds(correctedDelta);
  uptime += std::chrono::seconds(correctedDelta);

  std::time_t currentTime = std::chrono::system_clock::to_time_t(
    std::chrono::time_point_cast<std::chrono::system_clock::duration>(currentDateTime));
  localTime = *std::localtime(&currentTime);

  auto minute = Minutes();

Using the time_point_cast resolved the issue for me, but I haven’t tested it on linux so can’t guarantee it still works there, which is why I didn’t include it as part of this MR. Has this issue been raised before?

@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Build size and comparison to main:

Section Size Difference
text 382620B 192B
data 944B 0B
bss 22632B 0B

Run in InfiniEmu

@mark9064 mark9064 added the enhancement Enhancement to an existing app/feature label Nov 7, 2025
@minacode
Copy link
Contributor

minacode commented Nov 8, 2025

If you build the code using the docker container you should be able to verify your additional fix under Linux.

Do you have an explanation for why you encountered the problem under macOS? What is the problem there?

@daniebker
Copy link
Author

If you build the code using the docker container you should be able to verify your additional fix under Linux.

Do you have an explanation for why you encountered the problem under macOS? What is the problem there?

Yes, I’ve built the code under the docker container and it was working fine, in fact that’s the one I sent to the watch. I just tried removing the block I have locally for the mac compilation, but now it’s building fine, even after wiping the build, so I can’t reproduce the error I was seeing. Anyway, I didn’t include it as part of the MR because I wasn't sure it wasn’t just a ‘me’ issue.

@minacode minacode added this to the 1.17.0 milestone Nov 10, 2025
@minacode
Copy link
Contributor

Please fix the formatting error. Overall the code looks good to me, but I haven't tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement to an existing app/feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants