示例#1
0
文件: file.go 项目: zimmski/go-clang
// ModTime retrieves the last modification time of the given file.
func (c File) ModTime() time.Time {
	// time_t is in seconds since epoch
	sec := C.clang_getFileTime(c.c)
	const nsec = 0
	return time.Unix(int64(sec), nsec)
}
示例#2
0
文件: file_gen.go 项目: go-clang/v3.7
// Retrieve the last modification time of the given file.
func (f File) Time() time.Time {
	return time.Unix(int64(C.clang_getFileTime(f.c)), 0)
}