Fixed timing issues (use CLOCKS_PER_SEC instead of hardcoded value)