Mercurial > octave-nkf
comparison liboctave/UMFPACK/UMFPACK/Include/umfpack_timer.h @ 5164:57077d0ddc8e
[project @ 2005-02-25 19:55:24 by jwe]
author | jwe |
---|---|
date | Fri, 25 Feb 2005 19:55:28 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
5163:9f3299378193 | 5164:57077d0ddc8e |
---|---|
1 /* ========================================================================== */ | |
2 /* === umfpack_timer ======================================================== */ | |
3 /* ========================================================================== */ | |
4 | |
5 /* -------------------------------------------------------------------------- */ | |
6 /* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ | |
7 /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ | |
8 /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ | |
9 /* -------------------------------------------------------------------------- */ | |
10 | |
11 double umfpack_timer ( void ) ; | |
12 | |
13 /* | |
14 Syntax (for all versions: di, dl, zi, and zl): | |
15 | |
16 #include "umfpack.h" | |
17 double t ; | |
18 t = umfpack_timer ( ) ; | |
19 | |
20 Purpose: | |
21 | |
22 Returns the CPU time used by the process. Includes both "user" and "system" | |
23 time (the latter is time spent by the system on behalf of the process, and | |
24 is thus charged to the process). It does not return the wall clock time. | |
25 See umfpack_tic and umfpack_toc (the file umfpack_tictoc.h) for the timer | |
26 used internally by UMFPACK. | |
27 | |
28 This routine uses the Unix getrusage routine, if available. It is less | |
29 subject to overflow than the ANSI C clock routine. If getrusage is not | |
30 available, the portable ANSI C clock routine is used instead. | |
31 Unfortunately, clock ( ) overflows if the CPU time exceeds 2147 seconds | |
32 (about 36 minutes) when sizeof (clock_t) is 4 bytes. If you have getrusage, | |
33 be sure to compile UMFPACK with the -DGETRUSAGE flag set; see umf_config.h | |
34 and the User Guide for details. Even the getrusage routine can overlow. | |
35 | |
36 Arguments: | |
37 | |
38 None. | |
39 */ |