~pixelherodev/DSM-9

e7db07a7d193b4544e0a2463659fe291297a137f — Noam Preil a day ago 443ac5e
tmp
2 files changed, 13 insertions(+), 0 deletions(-)

M time.c
M util.h
M time.c => time.c +9 -0
@@ 38,6 38,15 @@ nanosec(void)

	return x / (fasthz / div);
}

uint64_t
time(uint64_t *p)
{
	uint64_t now = nsec();
	if(p != nil)
		*p = now;
	return now;
}
#else
#include <stdint.h>
#include <time.h>

M util.h => util.h +4 -0
@@ 6,3 6,7 @@ long sm2_load(struct sm2_instance *instance, char *base_path, int log);
void pin(int core);
char *readfile(char *path, size_t *size);

#ifdef _PLAN9_SOURCE
uint32_t time(uint32_t*);
#endif