Fix timing format to correctly handle microsecond portion of time delta (#448)
This commit is contained in:
parent
9ff7bde222
commit
5ef0d03cb8
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue