aardappel / procrastitracker

a Windows time tracking application
http://strlen.com/procrastitracker/
510 stars 54 forks source link

Removing idle time after going idle #42

Open Aeroxia opened 6 years ago

Aeroxia commented 6 years ago

I've been looking for something like this and there's a ton where they just do too much and charge too much (hundreds per month). This is almost exactly what I was hoping for (if a bit less pretty, haha). So thanks!

It would be ideal if it did as I saw some of those things do, subtracting the time spent idle once the idle limit is hit, rather than only stopping tracking from then onwards. I spend a lot of time staring at the screen and thinking, so it would let me set the idle limit higher (10-15 min) without worry of it becoming really inaccurate from going AFK.

aardappel commented 6 years ago

Ahh interesting.. currently if you are 1hr away and it is set to 15 min idle, it only counts 45 minutes, and I would agree that is indeed incorrect.

It depends on the case though.. if one time you spend 14 minutes staring at a document, and some other time 16 minutes, it would be a bit odd that this counts as 14 and 0 minutes in your proposed method, where the current system counts 14 and 15.

So the perfect system is perhaps more complicated yet: it counts less and less of initial idle time as the idle limit is hit? for example: time_active = max(0, time_before_limit - time_after_limit) which would give 0 (thus 60 idle) for the first example above, and 14 and 14 (or 0 and 2 idle) for the second example. It would basically go to zero at double the idle limit.

Aeroxia commented 6 years ago

(Sorry this got long!)

Hmm, I think a perfect system may be impossible. It's always going to have a case where it's counting or not counting something imperfectly (even if only partially), I guess it's about putting that somewhere where it works for your situation.

In my case, the idea is to set the limit high enough that it would never be hit when I'm active. The problem then would be coming back after a short break and the time between being counted, but when I go AFK I take a while so this wouldn't be a problem for me personally, and I consider it that if I came back that quickly I'm ok with it counting as time still working.

The only other case it would have an issue is if I was watching a video over 15 min. I'm not too concerned about recording that time, but just to throw it out there, it could possibly pop a window up like the one it has when the limit is reached, where if you're away it won't be a problem coming back to see it, and if you're indeed there you could simply hit esc to exit it and it would count as being active still. Otherwise, no response means it would subtract the idle time. (It could use the same window, and let you choose reasons for being away to track that, but I probably wouldn't use those buttons personally).

The issue there is that it isn't totally silent and automatic, so I don't know if that's worth it. But it would only come up when it was "sure" you were afk anyways.

Or maybe if you're not using the reasons part, it could come up at the idle limit, so you have 60 seconds to do something active or it'll count it as idle, and the window wouldn't still be there when you come back either. In that case it doesn't necessarily have to be something that takes focus, just a notification popup saying it's going to count you as AFK in 60 seconds if there's no input. If you're away, it won't be seen, if you're not, it's easy to just press any button.

I think after thinking about it I like that the most, but if somebody's limit is set low, it might possibly be annoying, and in that case I'd recommend raising the idle limit, or maybe being able to turn that feature off. The nice thing is I think it doesn't take any big changes, just a warning notification at the limit (or 60 sec before, maybe configurable, at least a toggle checkbox probably).

aardappel commented 6 years ago

Yeah, don't think its worth requiring active user input, it's more hassle than its worth.

Aeroxia commented 6 years ago

Well in the last case it's not requiring anything beyond what it already does. It would just notify about the idle time kicking in soon.

But whatever works, I'd love to see any of the above really.

Edit: I was just thinking, with your example, what if I come back after being fully away 20 minutes, and the limit is 15? I think this is a common case and it would still partially consider the time as active, when it was fully away time.

krthush commented 5 years ago

Hi again Aardappel,

Had to take a break from the AWS project, now I've got a bit more time... I've started work again now. I'm moving onto this thread because its a bit more relevant to my next question!

So this is again back to trying to send data regularly to my server, the way I'm doing it right now is piggy backing off of the idletime counter and data being sent in packets whenever activity name / the timer changes. The only problem with this is that if someone goes AFK for long periods of time (i.e. the idletime counter hits the limit set - in my case 180s - the counter stops at 180 and then data stops being sent to the server).

I'd like it if I could "reset" the counter whenever I send data to the server? Simply setting idletime = 0 when the data is sent doesn't work since I don't think the idletracker counter works that way. I thought about setting a higher idle counter limit but all that does is delay the period until the data is sent.

E.g. if I'm afk for 10min with a idle time limit of 10min, it would wait until the 10th min to send... where as right now it with an idle time limit of 180 would send on the 3rd min to send but would stop after that. The scenario I would like is that it would send data every 3min saying all the time was "idle".

What do you think?