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

redundant code in setTime() #69

Open
denis-stepanov opened this issue Sep 9, 2023 · 0 comments
Open

redundant code in setTime() #69

denis-stepanov opened this issue Sep 9, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@denis-stepanov
Copy link
Owner

System::setTime() currently has:

  if (!settimeofday(&tv_new_time, NULL)) {
    time = new_time;
    localtime_r(&time, &tm_time);
    setTimeSyncTime(time);
    setTimeSyncStatus(TIME_SYNC_OK);
  }

At the same time, we set a callback to settimeofday() and that callback does all the same actions. So it is not necessary to make them in setTime().

@denis-stepanov denis-stepanov added the enhancement New feature or request label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant