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

Time::set(0,0) shouldn't override the timebase and context #1090

Closed
metzdigital opened this issue Nov 3, 2021 · 0 comments
Closed

Time::set(0,0) shouldn't override the timebase and context #1090

metzdigital opened this issue Nov 3, 2021 · 0 comments
Labels

Comments

@metzdigital
Copy link
Contributor

F´ Version
Affected Component

Problem Description

A description of the problem with sufficient detail to understand the issue.

How to Reproduce

The Time::Set method overrides the classes already established time base and context values. The set function shouldn't be setting member variables outside the scope of the arguments provided.

Proposed change - Line 25 of Time.cpp should be this:

void Time::set(U32 seconds, U32 useconds) {
    this->set(this->m_timeBase, this->m_timeContext, seconds, useconds);
}

Current implementation:

void Time::set(U32 seconds, U32 useconds) {
    this->set(TB_NONE,0,seconds,useconds);
}

This also applies for the set(timebase,sec,usec) method as well, shouldn't override the context:

void Time::set(TimeBase timeBase, U32 seconds, U32 useconds) {
    this->set(timeBase,0,seconds,useconds);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants