my $ticks= Win32::GetTickCount() - $time; $ticks += ~0 if $ticks < 0;