Giter Site home page Giter Site logo

Comments (6)

maxRN avatar maxRN commented on September 13, 2024

Hi,
a resume timer feature would be highly appreciated!
My suggestion on how to implement this would be the following:

[
  {
    "desc": "something else",
    "workTimes": [
      {
        "start": time1,
        "end": time2
      },
      {
        "start": time1,
        "end": time2
      },
      {
        "start": time1,
        "end": time2
      }
    ]
  }
]

I would be down to try and implement this if you think this is a valid approach

from tasktimer.

tomek-szczesny avatar tomek-szczesny commented on September 13, 2024

The approach that I suggested would not break backward compatibility, with only one field added (that may safely default to 0 if not present).
Otherwise one would have to implement format conversion as well, so the user files won't become useless after update.

from tasktimer.

caarlos0 avatar caarlos0 commented on September 13, 2024

feel free to take a swing at it, yes

from tasktimer.

maxRN avatar maxRN commented on September 13, 2024

The approach that I suggested would not break backward compatibility, with only one field added (that may safely default to 0 if not present).

Otherwise one would have to implement format conversion as well, so the user files won't become useless after update.

Ah, of course you're right I totally missed that!

I'm having a little trouble understanding your proposed solution, though:
If I understand correctly: when we resume a task we take the delta between the current time and the end time and add this duration (in seconds) to the breakTime. And when we pause the task again we just update the end time and the new total is now the delta between end and start time, minus the breakTime in seconds?

from tasktimer.

tomek-szczesny avatar tomek-szczesny commented on September 13, 2024

That is exactly what I had in mind. Sounds even better after you explained it back to me. :)

from tasktimer.

jugglingjsons avatar jugglingjsons commented on September 13, 2024

Resurrecting the thread, if anyone is interested in pursuing it a little further - there's a working version with task restarter here #127

Caution

Will work only on new projects, I haven't tested it with any old ones. As it changed the base structure of entities. Some exporters may not work either, but the report I use works fine.

from tasktimer.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.