-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Rework time related code #64
Conversation
These changes begin the process of decoupling timing code from threading code, adding additional timing functionality, and removing unused functionality. * Add conversion functions between timespec and timeval * Add arithmetic functions for timespec and timeval * Make sane the public interface for internal timing functions * Remove false comment about quagga_get_relative updating recent_time on systems where gettimeofday() is used to compute a relative system time, since this never happens... * Fix bug on __APPLE__ where the argument to quagga_get_relative is not actually set with the computed system monotonic time * Decouple thread.c time caching from actual timing logic * Remove global variable recent_time because it is never used * Add FRR_CLK_REALTIME to supported clocks * Document new and existing functionality. * Rename quagga_* time functions to frr_* time functions Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* Include timeutil.h where necessary * Rename frr_* time functions to be project name agnostic * Refactor to use renamed time functions Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
d6ef0a6
to
6bfbc40
Compare
Continous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-35/ This is a comment from an EXPERIMENTAL automated CI system. |
Continous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-36/ This is a comment from an EXPERIMENTAL automated CI system. |
Mhm. I'd go in a somewhat different direction in reworking this, particularly I don't see the point of TU_CLK_REALTIME. Need to put some brain-cycles on it. I fully agree with ripping out recent_time and splitting it off thread.c though. Also, the first commit on this is marked WIP, does that mean the pull request will change further? |
@eqvinox and myself discussed these changes some more. We came to the conclusion that the intent is no longer to pretend to emulate various system time calls; timeutil.[ch] will now provide exactly one clock -- a monotonic clock -- and the rest of the codebase will use gettimeofday() for wall time. Per this move the various wrappers for a monotonic clock will be removed. Closing this PR as @eqvinox will submit a combined patch with these changes. |
This is a set of changes that aim to clean up timing code.
Summary of changes: