Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 29, 2016, 05:10:01 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Looking for a very flexible timer  (Read 8407 times)

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,880
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #25 on: May 02, 2015, 01:43:25 AM »
OK, I finally worked out all the showstopper bugs I could find, and here's the first iteration:
https://www.dropbox....timer_win32.zip?dl=0

I call it AFL Timer (A Flexible Logging Timer) and it doesn't quite have the final polish, but I wanted to let you and others test it and report bugs, refine features, etc.  If anybody wants to play with the source, I can send that along too.  Enjoy!

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,251
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #26 on: May 02, 2015, 03:34:36 AM »
thanks Edvard :-*
will have a go at that this evening
Tom

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,548
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #27 on: May 02, 2015, 01:02:56 PM »
OK, I finally worked out all the showstopper bugs I could find, and here's the first iteration:
https://www.dropbox....timer_win32.zip?dl=0

I call it AFL Timer (A Flexible Logging Timer) and it doesn't quite have the final polish, but I wanted to let you and others test it and report bugs, refine features, etc.  If anybody wants to play with the source, I can send that along too.  Enjoy!

Hmm.

I either I don't understand the interface or some stuff I would want as a main purpose is missing.

The key comparison is the Stopwatch part of my iPhone app, which mimics regular "sports" stopwatches. So you start a task with a big "Go" button, and then you can either hit "Stop" or "Lap". (Or both, in some sequential order.)

(Whether or not you have stopped the running timer), Lap (but it could be Phase or something) captures fragmentary chunks of time, which *may or may not have been edited, see below!*, which then add up to the total time.

Go and Stop seem simple enough to me.

So then what I see Edvard has already done that a "stopwatch" can't do, is fix "annoyances" with the logged time. So you can do all the add/delete chunks of the time measured by the Laps (or just the total time), and then you're left with a nice "clean" record of time spent on the project.

Is some or all of that stopwatch effect in there, and I am just having trouble with the interface GUI?


tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,251
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #28 on: May 02, 2015, 06:20:48 PM »
Very well done Edvard :Thmbsup:

I've only managed a quick look so for:

+ Stop / Start  works well.
When I make a second task:
+ the task that is active remains highlighted, no matter which task has focus -- I think that's good (but see below)
+ when I double-click [The Time] it (1) gets copied to clipboard & (2) stops/starts (as appropriate) - that is very nice :up:
+ are you using Corbel for the timer? If not, it's something similar - makes very good legibility :up
=>
- The font size (for time) is too big here, and is cropped at the bottom (my monitor resolution is 90ppi - probably below average these days)

Changing tasks seems to be problematic:
- I get confused about which task has focus:
I currently have two tasks: when one is selected, the timer is still related to the other ( I listed this as a +ve above :-/ ) =>
- even when I stop the timer on the active task, I cant find how to change to the other task.

I wonder if we need a stop/start button here?

Will have a longer test tomorrow
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,251
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #29 on: May 02, 2015, 08:52:39 PM »
Forgot to say -
the new task is problematic:
you have to click 'Reset' otherwise the task will start with the total of the previous task (when I click in the time 'zone').

Screenshot - 2015-05-03 , 03_51_57.pngLooking for a very flexible timer

(in TEST001  I clicked 'Reset')
Tom

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,880
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #30 on: May 03, 2015, 03:25:10 AM »
OK, I'd seen the issue with the timer font and it's not an issue with your DPI, but with the GUI elements showing differently on different platforms (I am doing all development on Linux, so everything looks great for me ;) ).  I can fix that, just the clock window may have to be a bit larger.  On my box, I use the Euromode font as my main font; I love the square-ish look and it's very legible, more so than the fonts it was inspired from (Microgramma and Eurostile) and makes a very nice clock face.  I wish I could embed it in my program, but I'm sure there would be licensing issues or something.  I didn't set the font, Lazarus just uses whatever the default is if I don't set it explicitly, so looks like it chose something funky ;D

I considered a start/stop button, but I thought using the clock as  button would be economical as far as UI goes; maybe I was wrong...  :o
As far as tasks, the last task in the list always has focus; at this stage of development, it's the only way I could keep things straight.  When you click on another task to change the name, that's all that's allowed.  Are you wanting to change between tasks to add more time on the selected task?  Great idea, and I'm sure I can figure out how to do that.  Let me know what you are needing exactly.  

For the Reset function, I think I know what's going on there.  It doesn't start with the Total, it starts from where the previous task stopped.  So you want the clock to default to 0 for every new task?  I can do that.  In fact, it may be time to introduce saving preferences, and have the option be "New task - Reset to 00:00 or Continue from previous time".  

@TaoPhoenix: It's not you, it's me ;)  I was trying to keep the timekeeping as simple as possible because even as it is I had a devil of a time keeping the time set-able but synchronized with real time, and the correct time showing up in the correct places.  That's why I made it so when you make a new task, the old task is "closed out"; that is, the time is finalized.  That can be changed in the final CSV file, but if I'm interpreting Tomos' comments correctly, maybe I should make it so you can switch between tasks to add time to a previous one.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,251
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #31 on: May 03, 2015, 04:49:34 AM »
 :D I forgot I had made Corbel the default font (in my defense, it was years ago).

Corbel
I think it makes numbers especially easier to read

Screenshot - 2015-05-03 , 11_47_43.png

although in this example the 'g' and the '9' are a bit too similar maybe


I think I wanted the start/stop button just so as I could change tasks - so, no, I dont see any need for it.
But I would like to be able to resume an older task.

Re new task starting with the end-amount of the previous task - I hadnt thought of it before but this is a very good way of working (like timing a lap). But if you can make it user-changeable - without too much stress - all the better.

I notice:
  • create, say, three tasks - without using reset (let each run for a time before creating the next)
  • then create a fourth task - it will show the endtime of task #3 in the timer
  • try Reset on task #4 - it reverts to endtime of task #2
should it not simply reset to zero? (again, I may be missing an application)
Tom

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,548
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #32 on: May 03, 2015, 05:52:07 AM »

I considered a start/stop button, but I thought using the clock as  button would be economical as far as UI goes; maybe I was wrong...  :o
...
As far as tasks, the last task in the list always has focus; at this stage of development, it's the only way I could keep things straight.  When you click on another task to change the name, that's all that's allowed.  Are you wanting to change between tasks to add more time on the selected task?  Great idea, and I'm sure I can figure out how to do that.  Let me know what you are needing exactly.  
...
@TaoPhoenix: It's not you, it's me ;)  I was trying to keep the timekeeping as simple as possible because even as it is I had a devil of a time keeping the time set-able but synchronized with real time, and the correct time showing up in the correct places.  That's why I made it so when you make a new task, the old task is "closed out"; that is, the time is finalized.  That can be changed in the final CSV file, but if I'm interpreting Tomos' comments correctly, maybe I should make it so you can switch between tasks to add time to a previous one.


Well, pointing out a "merge" of this program and the iPhone stopwatch, I'd suggest a row of buttons somewhere. Start Stop Lap.  That way you know what a button does, but another reason is more important - the iPhone thing tries to do *three things with two buttons* and if you mis-click them in the wrong order it messes up or wipes out your time log!

And because I like fancy "implicit tricks", for "program-chainers" like me, a set of buttons means you can do things like using one of those automated mouse-movers (or other things) so that it does stuff like:

"start, wait until 50 min, stop (because you know the user is slacking somehow!), Lap to log the fragment, Wait 10 minutes, Start". So then theoretically you can even leave it sitting there in the background for days!

And yeah, I am *totally* a fan of clicking back and forth between tasks. So for me (so far!) it's as simple as Click to make a Task Active (possibly checking if you need to finish processing the old one, to help prevent misclicks!).

And I mentioned in passing but one reason the clock didn't work for me is because on my ... fading ... system, it didn't start anything! So if you imagine, "click the clock ... nothing happens ... okay..." !



Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,880
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #33 on: May 04, 2015, 01:36:46 AM »
I notice:
  • create, say, three tasks - without using reset (let each run for a time before creating the next)
  • then create a fourth task - it will show the endtime of task #3 in the timer
  • try Reset on task #4 - it reverts to endtime of task #2
should it not simply reset to zero? (again, I may be missing an application)

If my logic is correct here, if the fourth task has not been started yet, it may (should?) reset to the beginning time of #3, which is the ending time of #2.  Once the fourth task has started, reset should simply reset to the beginning time of #4.  Sounds like I really do need to implement some choices and defaults like  "Start new tasks at zero/Continue from previous."

Also, I have been working on some GUI changes, which I'd like your opinion on the layouts:
- No "New Task" edit box; Since we can change the Title of the task in the grid anyway, why not just have it all happen there?
- Start/Stop button
- Larger Clock
- Replaced the H/M/S buttons on either side of the clock with more compact Up/Down buttons
- Direct editing of the time in the clock

Layout 1 (yes, the button order should be H/M/S, fixed in the other one):
screenshot1.png

Layout 2:
screenshot2.png

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,548
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #34 on: May 04, 2015, 03:28:30 AM »

I like version 2 for layout, though I wonder if it was a typo that the task-begin-end-total bar was left out?

It just seems we're so close to everything, because if there is a "stopwatch mode", then it can start with a timer of 0, start-stop works as normal, and "lap" creates its own "pseudo-tasks" aka the laps breaking down the segments of each task, below the main header of it.

It feels to me like this should be easy ... but famous last words?


Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,880
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #35 on: May 04, 2015, 09:13:51 PM »
I like version 2 for layout, though I wonder if it was a typo that the task-begin-end-total bar was left out?

It just seems we're so close to everything, because if there is a "stopwatch mode", then it can start with a timer of 0, start-stop works as normal, and "lap" creates its own "pseudo-tasks" aka the laps breaking down the segments of each task, below the main header of it.

It feels to me like this should be easy ... but famous last words?

Umm... yes.   :stars:
 
... and I have no idea what happened in the screenshot for #2, but yeah, I like that layout better too.  I may even have some ideas for a 3rd, but first I think I need to simply get the main stuff happening and get some feedback from Tomos as well.

Onward!

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,251
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #36 on: May 05, 2015, 03:41:14 AM »
Umm... yes.   :stars:

 ;D you're doing great :Thmbsup:

Re: layouts
both look good there - but #2 is preferable I think - and more foolproof too :up:
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,251
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #37 on: May 05, 2015, 04:00:59 AM »
I notice:
  • create, say, three tasks - without using reset (let each run for a time before creating the next)
  • then create a fourth task - it will show the endtime of task #3 in the timer
  • try Reset on task #4 - it reverts to endtime of task #2
should it not simply reset to zero? (again, I may be missing an application)

If my logic is correct here, if the fourth task has not been started yet, it may (should?) reset to the beginning time of #3, which is the ending time of #2.  Once the fourth task has started, reset should simply reset to the beginning time of #4.  Sounds like I really do need to implement some choices and defaults like  "Start new tasks at zero/Continue from previous."

I'm still confused by the above:
-I'm not sure *why* would the user want it to revert to the beginning of task #3 in the example above? (Even if it is logical in terms of how it works.)

So, a group of tasks can ultimately be treated as one task, simply by looking at the end time of the last one.
IF I can revert a new task to zero, it would have to be the start of a new group - this would be a great feature - but I dont know if it's possible (?)
+
Another feature could be to add a new task below the current group - i.e. I could add a new task to group #one, even after having created (and run) a second group. This could cause user-confusion though :-/ and again I have no ideas about difficulties of implementation. What do you think?
Tom

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 10,251
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #38 on: May 05, 2015, 04:17:59 AM »
Maybe this is not yet implemented:
tasks are not saved on closing.
___________


If a timer is active and already stopped/started again - I find the display confusing:
  • I see the end time in the timer
  • I see start time and previous end time below
  • I see previous total below

I cannot at a glance see:
  • how long I've been working on this task in this session
  • and how long I've actually been working on this task in total

I'm wondering, would this help
  • show the end-time slightly greyed when task is active - I suspect this would also have to be refreshed though, in oder to refresh the total time (?)
  • the total time gets refreshed (every second?)
Tom

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,880
    • View Profile
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #39 on: May 05, 2015, 11:51:25 PM »
both look good there - but #2 is preferable I think - and more foolproof too

#2 it is... I'll roll with that.  Though how it is in the screenshot probably won't be the final final form.

I'm still confused by the above:

I admit it is confusing, but all I was saying is that if task #4 has been initialized, but not started, then the value that remains stored in the Reset variable is the beginning time of the previously active task, so that explains the behavior.  Bug?  Yes, that should count as a bug.  But I'm left wondering what should be happening.  Should hitting Reset at the point after a new task is initialized set the start time to Zero?  Or the end time of the previous task?  (Actually, I have an idea; more about that farther down...).

Quote
So, a group of tasks can ultimately be treated as one task,
...
I have no ideas about difficulties of implementation. What do you think?

Task grouping sounds like a great idea, but I am at a loss as to how to implement it.  For now, anyways...

Quote
Maybe this is not yet implemented:
tasks are not saved on closing.

Whoops!  Time to implement auto-save, or a reasonable facsimile.  Should it ask the user to confirm on exit?  Or simply save the session with a possibility to recall on the next start-up?  Or a set-able option to automatically load the previous task list on start-up?  So many possibilities...



OK, so with most of the internal logic pretty set, here's what I'm thinking for the next iteration of user interaction:

New Task:
- Make a toggle for "Start at Zero" or "Continue from Previous".

Reset:
- Reset should always reset to the beginning time of the current task, whether that is zero or something else depends on the New Task behavior.
OR...
- Make "Continue from Previous" the default 'New Task' action, but "Reset" will set the clock back to zero.  Much simpler code that way...

Timer:
- I don't like the idea of the end time updating in the list, I mean, it's not even there until you stop the timer, so I think "graying out" the end time and total when re-starting a current task is a great idea; takes your mind off the list and back on the timer, and also lets you know at a glance that this is a task that has been continued.  Which leads to...

Tasks:
- Going back to an old task to continue the time spent on it is a good idea as well.  I know how it can be done, so that'll be in the next iteration.
- Grouping tasks isn't as easy, maybe even impossible without a custom component.  The StringGrid component has a lot of methods and properties to it, and is quite complex.  Trying to wrangle sub-lists into it would be problematic at best.

Sessions:
- Saving sessions should be a given by now, you're right; not saving the session is kind of unsettling.  But how to implement?  I'm thinking either offer the user to save the current session on exit, or simply auto-save and have an option to auto-load on next start-up.  That will be easy to do.  Hmmm... maybe even differentiate between saving a session and saving a final file; kind of like: if saving a session, then auto-load the session on the next start-up, but if saving a final file, the next start-up is blank.  You can always manually load a saved file from the File menu and continue as well.

So that's what I got, I'm going to dive back in and get something ship-shape for you to test, hopefully not too far in the future.  I'll keep the thread posted with any breakthroughs...  
8)




« Last Edit: May 05, 2015, 11:57:00 PM by Edvard »

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,650
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: Looking for a very flexible timer
« Reply #40 on: September 15, 2015, 10:17:13 PM »
You might want to try Toggl.

It's web based, but there is an official free desktop app for Windows, to go with it.

It is one of the better free task based time trackers I have found, great for freelancers and small teams.

You can set a starting amount of time elapsed, and then click the Start button and it will begin counting up from that time.

Once you have actually posted a time task, you can resume the timer for it later, or click to edit it (and then resume).

There is even an Android or iOS app for it, and a Chrome add-on to integrate it into various web apps.