setTimeout wrapper, JavaScript