rih5342
Marine/Ocean
- May 8, 2007
- 40
I'm trying to get this to work with Gfortran and Windows7.
Anyone have experience with accessing the OS under Seven?
Thanks.
MODULE IFWIN
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
PRIVATE
PUBLIC QueryPerformanceCounter
INTERFACE
FUNCTION QueryPerformanceCounter(lpPerformanceCount)
BIND(C, NAME='QueryPerformanceCounter')
IMPORT
IMPLICIT NONE
INTEGER(C_INT) QueryPerformanceCounter
INTEGER(C_INT64_T) lpPerformanceCount
END FUNCTION QueryPerformanceCounter
END INTERFACE
PUBLIC QueryPerformanceFrequency
INTERFACE
FUNCTION QueryPerformanceFrequency(lpFrequency)
BIND(C, NAME='QueryPerformanceFrequency')
IMPORT
IMPLICIT NONE
INTEGER(C_INT) QueryPerformanceFrequency
INTEGER(C_INT64_T) lpFrequency
END FUNCTION QueryPerformanceFrequency
END INTERFACE
END MODULE IFWIN
PROGRAM MAIN
USE IFWIN
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
INTEGER(C_INT64_T) lpFrequency, lpPerformanceCount
INTEGER(C_INT) I
I = QueryPerformanceFrequency(lpFrequency)
I = QueryperformanceCounter(lpPerformanceCount)
WRITE (*, *) lpFrequency, lpPerformanceCount
END PROGRAM MAIN
Anyone have experience with accessing the OS under Seven?
Thanks.
MODULE IFWIN
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
PRIVATE
PUBLIC QueryPerformanceCounter
INTERFACE
FUNCTION QueryPerformanceCounter(lpPerformanceCount)
BIND(C, NAME='QueryPerformanceCounter')
IMPORT
IMPLICIT NONE
INTEGER(C_INT) QueryPerformanceCounter
INTEGER(C_INT64_T) lpPerformanceCount
END FUNCTION QueryPerformanceCounter
END INTERFACE
PUBLIC QueryPerformanceFrequency
INTERFACE
FUNCTION QueryPerformanceFrequency(lpFrequency)
BIND(C, NAME='QueryPerformanceFrequency')
IMPORT
IMPLICIT NONE
INTEGER(C_INT) QueryPerformanceFrequency
INTEGER(C_INT64_T) lpFrequency
END FUNCTION QueryPerformanceFrequency
END INTERFACE
END MODULE IFWIN
PROGRAM MAIN
USE IFWIN
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
INTEGER(C_INT64_T) lpFrequency, lpPerformanceCount
INTEGER(C_INT) I
I = QueryPerformanceFrequency(lpFrequency)
I = QueryperformanceCounter(lpPerformanceCount)
WRITE (*, *) lpFrequency, lpPerformanceCount
END PROGRAM MAIN