Skip to content

Commit

Permalink
modifying the way runMiss is done for the moment
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremysawesome committed Sep 25, 2015
1 parent d505645 commit 89891be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Nagger.Services/NaggerRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void Run()
_outputService.OutputSound();

var currentTask = _taskService.GetLastTask();
var runMiss = _timeService.IntervalsSinceLastRecord();
var runMiss = 0;

if (currentTask != null)
{
Expand All @@ -50,6 +50,7 @@ public void Run()
{
if (!_inputService.AskForBoolean("Are you working?"))
{
runMiss = _timeService.IntervalsSinceLastRecord();
if (runMiss <= 1) _timeService.RecordMarker(askTime);
else
{
Expand All @@ -73,6 +74,8 @@ public void Run()
return;
}

//todo: refactor the way runMiss is done
runMiss = _timeService.IntervalsSinceLastRecord();
// there will usually be 1 interval between the last time this ran and this time (it only makes sense)
if (runMiss <= 1) _timeService.RecordTime(currentTask, askTime);
else
Expand Down

0 comments on commit 89891be

Please sign in to comment.