Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Elapsed Time to Timer #16

Merged
merged 3 commits into from
Dec 8, 2018
Merged

Add Elapsed Time to Timer #16

merged 3 commits into from
Dec 8, 2018

Conversation

claire50
Copy link
Contributor

@claire50 claire50 commented Dec 4, 2018

Fixes Issue #12

Copy link
Contributor

@owenca owenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me! Just need minor changes for Haiku's naming conventions.

TimerView.cpp Outdated
@@ -5,7 +5,8 @@
TimerView::TimerView()
:
BTextView("timer"),
fRunning(false)
fRunning(false),
elapsedTime(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elapsedTime(0)
fElapsedTime(0)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TimerView.cpp Outdated
@@ -30,16 +31,17 @@ bool TimerView::Running()
void TimerView::Stop()
{
fRunning = false;
elapsedTime = Elapsed();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elapsedTime = Elapsed();
fElapsedTime = Elapsed();

TimerView.cpp Outdated
}

void TimerView::Pulse()
{
bigtime_t elapsed = Elapsed();
bigtime_t elapsed = fRunning ? Elapsed() : elapsedTime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bigtime_t elapsed = fRunning ? Elapsed() : elapsedTime;
bigtime_t elapsed = fRunning ? Elapsed() : fElapsedTime;

TimerView.h Outdated
@@ -19,6 +19,7 @@ class TimerView : public BTextView {
private:
bool fRunning;
bigtime_t fStartTime;
int elapsedTime;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int elapsedTime;
int fElapsedTime;

@claire50
Copy link
Contributor Author

claire50 commented Dec 8, 2018

Hi! I have changed the code a little bit, since I found a simpler way to fix the issue. I was having problems with committing onto GitHub, but I recloned it and changed the code again, so now it works. Thanks!

@owenca
Copy link
Contributor

owenca commented Dec 8, 2018

Thanks for making the fix even better!

@scottmc scottmc merged commit 8bc90d6 into HaikuArchives:master Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants