summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_time.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-03-26 20:54:05 +0000
committerphk <phk@FreeBSD.org>1998-03-26 20:54:05 +0000
commit00475b662ad28e7f09931eb67a642ba1ee36db99 (patch)
tree12dd2aed1e3b8ecf5eb4152bf06ffa8c3ede0d7e /sys/kern/kern_time.c
parentff4953fbcc9f747429234d5971a802bb653e451a (diff)
downloadFreeBSD-src-00475b662ad28e7f09931eb67a642ba1ee36db99.zip
FreeBSD-src-00475b662ad28e7f09931eb67a642ba1ee36db99.tar.gz
Add two new functions, get{micro|nano}time.
They are atomic, but return in essence what is in the "time" variable. gettime() is now a macro front for getmicrotime(). Various patches to use the two new functions instead of the various hacks used in their absence. Some puntuation and grammer patches from Bruce. A couple of XXX comments.
Diffstat (limited to 'sys/kern/kern_time.c')
-rw-r--r--sys/kern/kern_time.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index 295e8fa..a1fb4e3 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
- * $Id: kern_time.c,v 1.41 1998/02/20 16:35:53 phk Exp $
+ * $Id: kern_time.c,v 1.42 1998/02/25 04:10:32 bde Exp $
*/
#include <sys/param.h>
@@ -163,6 +163,7 @@ clock_settime(p, uap)
return (error);
if (ats.tv_nsec < 0 || ats.tv_nsec >= 1000000000)
return (EINVAL);
+ /* XXX Don't convert nsec->usec and back */
TIMESPEC_TO_TIMEVAL(&atv, &ats);
if ((error = settime(&atv)))
return (error);
OpenPOWER on IntegriCloud