Skip to content

Commit

Permalink
Fix timing format to correctly handle microsecond portion of time del…
Browse files Browse the repository at this point in the history
…ta (#448)
  • Loading branch information
clysto authored Oct 15, 2024
1 parent 9ff7bde commit 5ef0d03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/sshpiperd/typescript.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (l *filePtyLogger) loggingTty(msg []byte) ([]byte, error) {
delta := now.Sub(l.oldtime)

// see term-utils/script.c
fmt.Fprintf(l.timing, "%v.%06v %v\n", int64(delta/time.Second), int64(delta/time.Microsecond), len(buf))
fmt.Fprintf(l.timing, "%v.%06v %v\n", int64(delta/time.Second), int64(delta%time.Second/time.Microsecond), len(buf))

l.oldtime = now

Expand Down

0 comments on commit 5ef0d03

Please sign in to comment.