summaryrefslogtreecommitdiff
path: root/Ganlib/src/KDRCPU.f90
blob: 9c3109fa7675e67311cb3fa0c7a4990f736474de (plain)
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
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