blob: 390035abf9e229fdb7a248a08b098b3a2b468dfb (
plain) (
blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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*/
|