aboutsummaryrefslogtreecommitdiffstats
path: root/cad/pisces/files/xtimer_fbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cad/pisces/files/xtimer_fbsd.c')
-rw-r--r--cad/pisces/files/xtimer_fbsd.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/cad/pisces/files/xtimer_fbsd.c b/cad/pisces/files/xtimer_fbsd.c
new file mode 100644
index 000000000000..390035abf9e2
--- /dev/null
+++ b/cad/pisces/files/xtimer_fbsd.c
@@ -0,0 +1,43 @@
+/* ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+ *
+ * Copyright c 1988 The Board of Trustees of the Leland Stanford
+ * Junior University. All rights reserved. This routine may not
+ * be used without the prior written consent of Stanford University.
+ *
+ * ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
+ */
+
+/* XTIMER - return cpu time usage. */
+
+/* =======================================================================
+ * "XTIMER" - Return current (user) cpu time (in seconds) usage.
+ *
+ * Usage:
+ * subroutine xdate(tim)
+ * real tim - user seconds of cpu used.
+ *
+ * Original: Michael Eldredge -- Stanford University (may 88)
+ *
+ * -----------------------------------------------------------------------
+ */
+
+#include <sys/types.h>
+#include <sys/times.h>
+
+
+/*CENTRY*/
+void
+xtimer_(tim)
+ float* tim ;
+ {
+
+ float x ;
+ struct tms t ;
+ clock_t times() ;
+
+ (void)times(&t) ;
+ x = (float)t.tms_utime / 60.0 ;
+
+ *tim = x ;
+ }
+/*ENDCENTRY*/