summaryrefslogtreecommitdiffstats
path: root/btimec.c
diff options
context:
space:
mode:
authorNate Straz <nstraz@redhat.com>2005-09-13 16:01:28 +0000
committerNathan Straz <nstraz@redhat.com>2008-09-23 09:37:44 -0400
commitbf489daffc4902db3a9eb95d485fd867ac1ea524 (patch)
treec022f12c9d1bb8b56b566976cf5127b37112bbf1 /btimec.c
parentc38e0fba0a10d5af0bb25f674177cb6404f73991 (diff)
downloadqarsh-bf489daffc4902db3a9eb95d485fd867ac1ea524.tar.gz
qarsh-bf489daffc4902db3a9eb95d485fd867ac1ea524.tar.xz
qarsh-bf489daffc4902db3a9eb95d485fd867ac1ea524.zip
Flatten the qarsh tree.
Diffstat (limited to 'btimec.c')
-rw-r--r--btimec.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/btimec.c b/btimec.c
new file mode 100644
index 0000000..02c29bc
--- /dev/null
+++ b/btimec.c
@@ -0,0 +1,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);
+}