      subroutine time.ms(ms)
*
*
*
*
*
*
*
*
*
$catalog local
*
$include ccall.common
*
      equate libname to 'libc.so.6'
      equate fnname  to 'gettimeofday'
*
      $include ccall.getfn.include
*
      s1 = cc$nul4 : cc$nul8
      s2 = CC$FN.PUSHOFF : cc$4 :      ~
           CC$FN.PUSHVAL : cc$0 :      ~
           CC$FN.CALLFN  : fn.handle : ~
           CC$FN.RTN32   : cc$0 :      ~
           CC$FN.EXIT
      s = ccall(s1,s2)

      ms = bin2int(s[5,4]) * 1000
      ms += int(bin2int(s[9,4]) / 1000)

      return
   end
