The branch, change-clock-monotonic has been updated
discards 0911b8ac4c5abdc8779b92544fb089c748ae95d0 (commit)
via 7fa5922dd78cef83c10545e5ff48b6902877a409 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (0911b8ac4c5abdc8779b92544fb089c748ae95d0)
\
N -- N -- N (7fa5922dd78cef83c10545e5ff48b6902877a409)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
- Log -----------------------------------------------------------------
commit 7fa5922dd78cef83c10545e5ff48b6902877a409
Author: Gabriel Braga <gabriel.braga@xxxxxxxxxxxxx>
Date: Thu Apr 4 11:01:32 2024 +0200
Switch time() calls to monotonic clock calls (#7597)
In the event of a time warp the use of time() causes connections to
collapse.
This removes this problem by using a monotonic clock, based on libi2ncommon.
-----------------------------------------------------------------------
Summary of changes:
src/monotonic_clock.cpp | 22 +---------------------
src/monotonic_clock.hxx | 9 +++++----
2 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/src/monotonic_clock.cpp b/src/monotonic_clock.cpp
index eca7ad0..3b4e720 100644
--- a/src/monotonic_clock.cpp
+++ b/src/monotonic_clock.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2024 by Intra2net AG - Gerd v. Egidy
+Copyright (C) 2024 by Intra2net AG
The software in this package is distributed under the GNU General
Public License version 2 (with a special exception described below).
@@ -44,26 +44,6 @@ bool monotonic_clock_gettime(long int& seconds, long int&
nano_seconds)
/**
* @brief fetches the value from the monotonic clock source.
- * @return the time since system start in nanoseconds, 0 if read was
unsuccessful
- */
-long long monotonic_clock_gettime_nano()
-{
- long int seconds;
- long int nano_seconds;
- long long nano=0;
-
- if (monotonic_clock_gettime(seconds,nano_seconds))
- {
- nano=seconds;
- nano*=1000000000LL;
- nano+=nano_seconds;
- }
-
- return nano;
-}
-
-/**
- * @brief fetches the value from the monotonic clock source.
* @return the time since system start in seconds, 0 if read was unsuccessful
*/
int monotonic_clock_gettime_sec()
diff --git a/src/monotonic_clock.hxx b/src/monotonic_clock.hxx
index a6973a9..98a9583 100644
--- a/src/monotonic_clock.hxx
+++ b/src/monotonic_clock.hxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2024 by Intra2net AG - Gerd v. Egidy
+Copyright (C) 2024 by Intra2net AG
The software in this package is distributed under the GNU General
Public License version 2 (with a special exception described below).
@@ -19,9 +19,10 @@ in accordance with section (3) of the GNU General Public
License.
This exception does not invalidate any other reasons why a work based
on this file might be covered by the GNU General Public License.
*/
-
-#include <time.h>
+#ifndef __LIBT2N_MONOTONIC_CLOCK
+#define __LIBT2N_MONOTONIC_CLOCK
bool monotonic_clock_gettime(long int& seconds, long int& nano_seconds);
int monotonic_clock_gettime_sec();
-long long monotonic_clock_gettime_nano();
\ No newline at end of file
+
+#endif
\ No newline at end of file
hooks/post-receive
--
C++ inter-process communication library
--
libt2n-git - see http://www.intra2net.com/en/developer/libt2n for details.
To unsubscribe send a mail to libt2n-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|