fix(bklog):Fix flip-flopped buffer start/end timestamps
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 14 Jul 2020 19:40:03 +0000 (19:40 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 14 Jul 2020 19:40:03 +0000 (19:40 +0000)
exec/bklog

index 68d81ead0e89459930d44f6942dd5b80fc1ffda2..b4c8257ea8ee9bf782c08fbeaef3429e0e2581c9 100644 (file)
@@ -11,7 +11,7 @@ dirTmpDefault="/dev/shm"; # Default parent of working directory
 
 # Script Metadata
 scriptName="bklog";             # Define basename of script file.
-scriptVersion="0.1.28-test2";          # Define version of script.
+scriptVersion="0.1.28-test3";          # Define version of script.
 scriptURL="https://gitlab.com/baltakatei/ninfacyzga-01"; # Define wesite hosting this script.
 scriptTimeStart="$(date +%Y%m%dT%H%M%S.%N)"; # YYYYmmddTHHMMSS.NNNNNNNNN
 scriptHostname=$(hostname);     # Save hostname of system running this script.
@@ -1437,8 +1437,8 @@ main() {
            buffer+=("$line");
        done;
        # Mark time for buffer
-       timeBufferEndEpoch="$timeBufferStartEpoch" && vbm "DEBUG :$fn:timeBufferEndEpoch:$timeBufferEndEpoch";
-       timeBufferStartEpoch="$(date +%s)" && vbm "DEBUG :$fn:timeBufferStartEpoch:$timeBufferStartEpoch";
+       timeBufferStartEpoch="$timeBufferEndEpoch" && vbm "DEBUG :$fn:timeBufferStartEpoch:$timeBufferStartEpoch";
+       timeBufferEndEpoch="$(date +%s)" && vbm "DEBUG :$fn:timeBufferEndEpoch:$timeBufferEndEpoch";
        # Create dir_tmp if missing
        if ! [[ -d "$dir_tmp" ]]; then
            yell "ERROR:$fn:dir_tmp existence failure:$dir_tmp";