Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,9 @@ Handle:
if msg.cliId == invalidCliId {
msg.cliId = c.newCliId()
}
c.Printf("%s Created new outbox entry %s%s%s\n", termInfoPrefix, termCliIdStart, msg.cliId.String(), termReset)
nextTransaction := c.nextTransactionTime.Sub(c.Now())/time.Second*time.Second
c.Printf("%s (%s) Created new outbox entry %s%s%s, next transaction in %s\n", termInfoPrefix, c.Now().Format(shortTimeFormat), termCliIdStart, msg.cliId.String(), termReset, nextTransaction)

c.setCurrentObject(msg)
c.showQueueState()
break
Expand Down
3 changes: 3 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ type client struct {
// disableV2Ratchet causes the client to advertise and process V1
// axolotl ratchet support.
disableV2Ratchet bool

// nextTransactionTime stores the absolute time of the next transaction
nextTransactionTime time.Time
}

// UI abstracts behaviour that is specific to a given interface (GUI or CLI).
Expand Down
4 changes: 3 additions & 1 deletion client/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,9 @@ func (c *client) transact() {
delaySeconds = 5
}
delay := time.Duration(delaySeconds*1000) * time.Millisecond
c.log.Printf("Next network transaction in %s seconds", delay)
c.nextTransactionTime = c.Now().Add(delay)
c.log.Printf("Next network transaction in %s", (delay/time.Second*time.Second))

timerChan = time.After(delay)
}

Expand Down