Example #1
0
func TouchFile(f *os.File) error {
	var now wrappers.FILETIME
	wrappers.GetSystemTimeAsFileTime(&now)
	if err := wrappers.SetFileTime(syscall.Handle(f.Fd()), nil, &now, &now); err != nil {
		return NewWindowsError("SetFileTime", err)
	}
	return nil
}
Example #2
0
func GetTimeCounter() uint64 {
	var systemTime wrappers.FILETIME
	wrappers.GetSystemTimeAsFileTime(&systemTime)
	return fileTimeToUint64(systemTime)
}