use Win32::API; $timer = Win32::API->new( "winmm.dll", "long timeGetTime()" );