windows: Use stdtime for hcsshimtypes.ProcessDetails.CreatedAt

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-10-16 11:26:08 -07:00
parent ef5fe56c24
commit e7ea7b5b50
4 changed files with 57 additions and 64 deletions

View File

@@ -400,13 +400,9 @@ func (t *task) cleanup() {
// convertToProcessDetails converts a given hcsshim ProcessListItem to proto ProcessDetails
func (t *task) convertToProcessDetails(p hcsshim.ProcessListItem) (*hcsshimtypes.ProcessDetails, error) {
protobufTime, err := types.TimestampProto(p.CreateTimestamp)
if err != nil {
return nil, errors.Wrapf(errdefs.ErrInvalidArgument, "failed to convert timestamp for process pid: %d\n", p.ProcessId)
}
return &hcsshimtypes.ProcessDetails{
ImageName: p.ImageName,
CreatedAt: protobufTime,
CreatedAt: p.CreateTimestamp,
KernelTime_100Ns: p.KernelTime100ns,
MemoryCommitBytes: p.MemoryCommitBytes,
MemoryWorkingSetPrivateBytes: p.MemoryWorkingSetPrivateBytes,