Skip to content

Add time utility classes + UT#7452

Merged
maloel merged 5 commits into
realsenseai:developmentfrom
Nir-Az:Add_timer_class_to_new_file
Oct 14, 2020
Merged

Add time utility classes + UT#7452
maloel merged 5 commits into
realsenseai:developmentfrom
Nir-Az:Add_timer_class_to_new_file

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Sep 30, 2020

Copy link
Copy Markdown
Collaborator
  • Add a space for common utility classes.
  • Take timer helper functions from rendering.h , refactor + add functionality and place on timer.h utility file
  • Replace all time functions usage with new classes
  • Add unit tests for 3 new classes

@Nir-Az Nir-Az requested review from dorodnic, ev-mp and maloel September 30, 2020 09:20
@Nir-Az Nir-Az force-pushed the Add_timer_class_to_new_file branch from 1827198 to eb6e619 Compare September 30, 2020 11:37
Comment thread common/utilities/timer.h Outdated
Comment thread common/utilities/timer.h Outdated
Comment thread common/utilities/timer.h Outdated
Comment thread common/utilities/timer.h Outdated
Comment thread common/utilities/timer.h Outdated
Comment thread common/utilities/timer.h Outdated
Comment thread common/utilities/timer.h Outdated
@Nir-Az Nir-Az force-pushed the Add_timer_class_to_new_file branch from e224d4e to 97fda0e Compare October 5, 2020 06:35
@Nir-Az Nir-Az force-pushed the Add_timer_class_to_new_file branch from 97fda0e to 8cd5215 Compare October 5, 2020 07:24
@Nir-Az Nir-Az changed the title Add timer utility class + UT Add time utility classes + UT Oct 7, 2020
@Nir-Az Nir-Az removed request for dorodnic and ev-mp October 7, 2020 11:21
Comment thread common/utilities/periodic_timer.h Outdated
Comment thread common/utilities/periodic_timer.h Outdated
Comment thread common/utilities/periodic_timer.h Outdated
Comment thread common/utilities/periodic_timer.h Outdated
Comment thread common/utilities/stopwatch.h Outdated
Comment thread common/utilities/stopwatch.h Outdated
Comment thread common/utilities/timer.h Outdated
Comment thread common/utilities/stopwatch.h Outdated
Comment thread unit-tests/utilities/test-periodic_timer.cpp Outdated
Comment thread unit-tests/utilities/test-periodic_timer.cpp Outdated
Comment thread unit-tests/utilities/test-periodic_timer.cpp Outdated
Comment thread unit-tests/utilities/test-stopwatch.cpp Outdated
@Nir-Az Nir-Az force-pushed the Add_timer_class_to_new_file branch from 9ad2133 to c2e641c Compare October 13, 2020 12:42
CHECK_FALSE(t.has_expired());

std::this_thread::sleep_for(std::chrono::milliseconds(500));
std::this_thread::sleep_for(TEST_DELTA_TIME - std::chrono::milliseconds(400));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May not work if TEST_DELTA_TIME is < 400ms

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Replaced with TEST_DELTA_TIME / 2

@maloel maloel merged commit 405772c into realsenseai:development Oct 14, 2020
@Nir-Az Nir-Az deleted the Add_timer_class_to_new_file branch July 27, 2021 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants