145653Sbostic /*- 245653Sbostic * Copyright (c) 1990 The Regents of the University of California. 345653Sbostic * All rights reserved. 445653Sbostic * 545653Sbostic * %sccs.include.redist.c% 621335Sdist */ 712844Ssam 826522Sdonn #if defined(LIBC_SCCS) && !defined(lint) 9*46597Sdonn static char sccsid[] = "@(#)utime.c 5.4 (Berkeley) 02/23/91"; 1045653Sbostic #endif /* LIBC_SCCS and not lint */ 1121335Sdist 1212845Ssam #include <sys/time.h> 1345653Sbostic #include <utime.h> 1412844Ssam 15*46597Sdonn int 1645653Sbostic utime(path, times) 17*46597Sdonn const char *path; 18*46597Sdonn const struct utimbuf *times; 1912844Ssam { 2012844Ssam struct timeval tv[2]; 2112844Ssam 2245653Sbostic tv[0].tv_sec = times->actime; 2345653Sbostic tv[1].tv_sec = times->modtime; 2445653Sbostic tv[0].tv_usec = tv[1].tv_usec = 0; 2545653Sbostic return(utimes(path, tv)); 2612844Ssam } 27