Skip to content

Commit

Permalink
Re-added start
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasfredericks committed Feb 18, 2016
1 parent 7a396f5 commit cafb93c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Chrono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ Chrono::Chrono(unsigned long (*getTime_)(void), bool startNow) : _getTime(getTim
}
}

void Chrono::start(unsigned long offset) {
restart(offset);
}

void Chrono::restart(unsigned long offset) {
_startTime = _getTime();
_offset = offset;
Expand Down
1 change: 1 addition & 0 deletions Chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class Chrono
Chrono(unsigned long (*getTime_)(void), bool startNow=true);

// Starts/restarts the chronometer with optional starting offset.
void start(unsigned long offset = 0);
void restart(unsigned long offset = 0);

// Stops/pauses the chronometer.
Expand Down

0 comments on commit cafb93c

Please sign in to comment.