Skip to content
Discussion options

You must be logged in to vote

Hi @mcallisto -- sorry we missed this back in may. None of us have really been monitoring discussions...

  1. Looks good to me! (That's how I would do it.) Maybe the only thing I would change is updateAndGetTotalElapsedTime to currentTime or something. The name exposes implementation details. I might also hide everything behind a trait.
  2. Kyo isn't currently recommended for production, but it looks pretty solid to me
  3. Yes I would test with Clock.withTimeControl:
Clock.withTimeControl: timeControl =>
  for
    stopWatch <- AltStopWatch.create
    initialTimeStopped <- stopWatch.updateAndGetTotalElapsedTime
    _ <- timeControl.advance(1.hour)
    timeAfterOneHourStopped <- stopWatch.updateAndGet…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fwbrasil
Comment options

Answer selected by fwbrasil
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants