diff options
| author | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
|---|---|---|
| committer | stainer_t <thomas.stainer@oecd-nea.org> | 2025-09-08 13:48:49 +0200 |
| commit | 7dfcc480ba1e19bd3232349fc733caef94034292 (patch) | |
| tree | 03ee104eb8846d5cc1a981d267687a729185d3f3 /Ganlib/src/KDRCPU.f90 | |
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Ganlib/src/KDRCPU.f90')
| -rw-r--r-- | Ganlib/src/KDRCPU.f90 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Ganlib/src/KDRCPU.f90 b/Ganlib/src/KDRCPU.f90 new file mode 100644 index 0000000..9c3109f --- /dev/null +++ b/Ganlib/src/KDRCPU.f90 @@ -0,0 +1,34 @@ +subroutine KDRCPU(cpusec) +! +!----------------------------------------------------------------------- +! +!Purpose: +! system clock support. +! +!Copyright: +! Copyright (C) 2002 Ecole Polytechnique de Montreal +! This library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +!Author(s): A. Hebert +! +!Parameters: output +! cpusec : number of seconds elapsed since the first call to KDRCPU. +! +!----------------------------------------------------------------------- +! + real :: cpusec + double precision :: dtloc + integer,save :: isave=0 + double precision,save :: dtloc0 +! + if(isave==0) then + call CLETIM(dtloc0) + isave=1 + endif + call CLETIM(dtloc) + cpusec=real(dtloc-dtloc0) + return +end subroutine KDRCPU |
