Skip to content

Commit

Permalink
optimize timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardoventurini committed Nov 29, 2023
1 parent bc45bcf commit 61f94fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ export function pick (obj, keys) {
export function calculateWaitedOnTime (messageQueue) {
let waitedOnTime = 0;

const now = Ntp._now();

messageQueue.toArray().forEach(function (msg) {
if (msg._waitEventId) {
waitedOnTime += Ntp._now() - msg._waitEventId.at;
waitedOnTime += now - msg._waitEventId.at;
}
});

Expand Down

0 comments on commit 61f94fa

Please sign in to comment.