doc(bklog-plan):Add TODO task: correct drift of SECONDS
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 14 Jul 2020 01:03:27 +0000 (01:03 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 14 Jul 2020 01:03:27 +0000 (01:03 +0000)
exec/bklog-plan.org

index 9908efb73470195e960287d081335628d65b8e8e..9e5e54d988e552c7056f35015f3db5ccbc5b34ef 100644 (file)
@@ -53,6 +53,19 @@ in seconds between ~bufferTimestampOld~ and ~bufferTimestampNew~ may
 be calculated and an appropriate duration string generated from the
 ~timeDuration()~ function.
 
+** TODO Update ~SECONDS~ variable during while read loop
+2020-07-14T00:58Z; bktei> The starting timestamps of each output file
+still drifts against system time. Although the ~while read~ loop does
+not lose data, the drift causes the output files to be named weirdly.
 
+A possible solution is to correct the ~SECONDS~ variable against the
+current system time. Because ~date~ calls are slow, this correction
+should not be made after every line. At a minimum, the correction
+should occur once per buffer round, possibly after the buffer round
+has completed. If more frequent corrections are required, then the
+number of lines being read in each buffer round should be tracked and
+a modulus comparison may be implemented within the ~while read~ loop
+so that a correction is made after some fraction of the expected lines
+to be read are read.
 * bklog narrative