summaryrefslogtreecommitdiffstats
path: root/btimec.c
blob: 02c29bc4ef25b60a3a86bc5d9c23be4fb3f19ae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* 
 * btimec.c --
 *
 *	Example program for libbtime
 */

#include <stdio.h>
#include <stdlib.h>

#include "btime.h"

int
main(int argc, char **argv)
{
	unsigned int bt;
	char *btimedhost;

	if (argc != 2) {
		fprintf(stderr, "USAGE: %s <host>\n", argv[0]);
		exit(2);
	}

	btimedhost = argv[1];
	bt = btime(btimedhost);
	printf("%s: %u\n", btimedhost, bt);

	exit(0);
}