mirror of
https://github.com/containers/podman
synced 2024-10-20 17:23:30 +00:00
8e76ebcf6e
Wire this in to all state-bound container operations to ensure syncronization of container state. Also exposes PID of running containers via API. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #56 Approved by: rhatdan
17 lines
267 B
Go
17 lines
267 B
Go
// +build !arm,!386
|
|
|
|
package libpod
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
"time"
|
|
)
|
|
|
|
// Get the created time of a file
|
|
// Only works on 64-bit OSes
|
|
func getFinishedTime(fi os.FileInfo) time.Time {
|
|
st := fi.Sys().(*syscall.Stat_t)
|
|
return time.Unix(st.Ctim.Sec, st.Ctim.Nsec)
|
|
}
|