xref: /original-bsd/lib/libc/gen/utime.c (revision 7596ee73)
1 /*-
2  * Copyright (c) 1990 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #if defined(LIBC_SCCS) && !defined(lint)
9 static char sccsid[] = "@(#)utime.c	5.3 (Berkeley) 11/28/90";
10 #endif /* LIBC_SCCS and not lint */
11 
12 #include <sys/time.h>
13 #include <utime.h>
14 
15 utime(path, times)
16 	char *path;
17 	struct utimbuf *times;
18 {
19 	struct timeval tv[2];
20 
21 	tv[0].tv_sec = times->actime;
22 	tv[1].tv_sec = times->modtime;
23 	tv[0].tv_usec = tv[1].tv_usec = 0;
24 	return(utimes(path, tv));
25 }
26