-
Notifications
You must be signed in to change notification settings - Fork 2
/
sysdep_ux.for
executable file
·80 lines (55 loc) · 1.89 KB
/
sysdep_ux.for
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
C %P%
SUBROUTINE SYSTIM (ITYPE, TBUF, DIFM, DIFM0)
********************************************************************************
* Get the system time
* System Specific Subroutine - Sun/Solaris unix operating system
*
* if ITYPE = 0, the system time is returned in the TBUF char string
* and the saved times are updated
* if ITYPE = 1, the time diffetence in minutes from the the last
* ITYPE=0 call is returned in TDIF0 and the time
* difference in minutes from the last call to GETTIM
* is returned in TDIF.
********************************************************************************
IMPLICIT DOUBLE PRECISION (A-H, O-Z)
IMPLICIT INTEGER (I-N)
CHARACTER*99 SCCSID
CHARACTER*26 TBUF, CTIME
INTEGER TMSEC
INTEGER TIME
SAVE RMIN0, RLMIN
C SCCSID='$Id: sysdep_ux.for 44197 2010-07-13 12:26:03Z bruce.tran $ 20$Date: 2007/11/20 15:28:37 $ NGS'
*** Get time since Jan 1, 1970 in numerical format
TMSEC = TIME()
RMIN = DBLE(TMSEC) / 60.D0
IF (ITYPE .EQ. 0) THEN
*** Save current minutes
RMIN0 = RMIN
RLMIN = RMIN
*** Convert numeric to ASCII string
*** Now put C string into a FORTRAN string
TBUF = CTIME(TMSEC)
ELSEIF (ITYPE .EQ. 1) THEN
*** Get time differences
DIFM0 = RMIN - RMIN0
DIFM = RMIN - RLMIN
*** Update RLMIN
RLMIN = RMIN
ELSE
*** Illegel ITYPE
STOP 'ILLEGAL ITYPE IN SUBROUTINE SYSTIM'
ENDIF
RETURN
END
SUBROUTINE MYFLSH (IUNIT)
********************************************************************************
* FLUSH THE IUNIT BUFFER
* System Specific Subroutine - Sun/Solaris unix operating system
********************************************************************************
IMPLICIT NONE
INTEGER IUNIT
C
CALL FLUSH (IUNIT)
C
RETURN
END