timeout should be in milliseconds, not seconds.