        subroutine forttime(t)
        use, intrinsic :: iso_c_binding
        use, intrinsic :: iso_fortran_env
    interface
        logical(c_bool) function QPC(qpct) bind(c,name='QueryPerformanceCounter')
            use, intrinsic :: iso_c_binding
            integer(c_int64_t)qpct
        end function QPC
        logical(c_bool) function QPF(frq) bind(c,name='QueryPerformanceFrequency')
            use, intrinsic :: iso_c_binding
            integer(c_int64_t)frq
        end function QPF
        end interface
!        integer,parameter :: REAL64=selected_real_kind(12)
!        integer,parameter :: int64=selected_int_kind(12)
        real(REAL64) t
        integer(int64) i1,sc_rate
        logical(c_bool) retval
#if ! _WIN64 || ! __INTEL_COMPILER
        call system_clock(i1,sc_rate)
#else
        retval= QPC(i1)
        retval= QPF(sc_rate)
#endif
        t = i1/real(sc_rate,REAL64)
        return
        end

