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:
commit
fdfd273cf0
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user