summaryrefslogtreecommitdiff
path: root/sys/src/cmd/aquarela/testtime.c
blob: 841c907092e7c0e42acab0e61fdc975b3bf34d79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "headers.h"

void
threadmain(int argc, char **argv)
{
	ulong now, now2;
	vlong nttime;
	if (argc > 1) {
		nttime = strtoull(argv[1], 0, 0);
		now2 = smbtime2plan9time(nttime);
		print("%ld %s", now2, ctime(now2));
	}
	else {
		now = 1032615845;
		nttime = smbplan9time2time(now);
		print("0x%.llux\n", nttime);
		now2 = smbtime2plan9time(nttime);
		print("now %ld %s", now, ctime(now));
		print("now2 %ld %s", now2, ctime(now2));
	}
}