we want microuptime too.
This commit is contained in:
parent
3c7be73762
commit
a329e3090a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: emul.c,v 1.84 2009/03/30 02:01:09 christos Exp $ */
|
||||
/* $NetBSD: emul.c,v 1.85 2009/03/30 12:47:49 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.84 2009/03/30 02:01:09 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.85 2009/03/30 12:47:49 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
|
@ -252,6 +252,18 @@ getnanouptime(struct timespec *ts)
|
|||
ts->tv_nsec = nsec;
|
||||
}
|
||||
|
||||
void
|
||||
getmicrouptime(struct timeval *tv)
|
||||
{
|
||||
uint64_t sec, nsec;
|
||||
int error;
|
||||
|
||||
/* XXX: this is wrong, does not report *uptime* */
|
||||
rumpuser_gettime(&sec, &nsec, &error);
|
||||
tv->tv_sec = sec;
|
||||
tv->tv_usec = nsec / 1000;
|
||||
}
|
||||
|
||||
void
|
||||
malloc_type_attach(struct malloc_type *type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue