Skip to content

Commit fdfd273

Browse files
authored
Merge pull request #1218 from scop/feat/freebsd-process-start
[process][freebsd] implement createTimeWithContext
2 parents 64a13e4 + 41e2595 commit fdfd273

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

process/process_freebsd.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error)
111111
}
112112

113113
func (p *Process) createTimeWithContext(ctx context.Context) (int64, error) {
114-
return 0, common.ErrNotImplementedError
114+
k, err := p.getKProc()
115+
if err != nil {
116+
return 0, err
117+
}
118+
return k.Start.Sec*1000 + k.Start.Usec/1000, nil
115119
}
116120

117121
func (p *Process) ParentWithContext(ctx context.Context) (*Process, error) {

0 commit comments

Comments
 (0)