1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

Merge pull request #1218 from scop/feat/freebsd-process-start

[process][freebsd] implement createTimeWithContext
This commit is contained in:
shirou 2022-01-06 22:04:54 +09:00 committed by GitHub
commit fdfd273cf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,11 @@ func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error)
} }
func (p *Process) createTimeWithContext(ctx context.Context) (int64, error) { func (p *Process) createTimeWithContext(ctx context.Context) (int64, error) {
return 0, common.ErrNotImplementedError k, err := p.getKProc()
if err != nil {
return 0, err
}
return k.Start.Sec*1000 + k.Start.Usec/1000, nil
} }
func (p *Process) ParentWithContext(ctx context.Context) (*Process, error) { func (p *Process) ParentWithContext(ctx context.Context) (*Process, error) {