   :group 'ycmd
   :type '(number))
 
-(defcustom ycmd-startup-timeout 3000
-  "Number of milliseconds to wait for the server to start."
+(defcustom ycmd-startup-timeout 3
+  "Number of seconds to wait for the server to start."
+  :group 'ycmd
+  :type '(number))
+
+(defcustom ycmd-delete-process-delay 3
+  "Seconds to wait for the server to finish before killing the process."
   :group 'ycmd
   :type '(number))
 

                (ycmd--with-all-ycmd-buffers (ycmd--report-status 'unparsed))))
             (t
              ;; timeout after specified period
              (when (< (/ ycmd-startup-timeout 1000) (- (float-time) start-time))
                (ycmd--with-all-ycmd-buffers (ycmd--report-status 'errored))
                (when (ycmd-running?) (ycmd-close))
                (error "ERROR: Ycmd server timeout"))))))))))

  "Start a new server using HMAC-SECRET as its hmac secret."
  (let ((proc-buff (get-buffer-create ycmd--server-buffer-name)))
    (with-current-buffer proc-buff
      (buffer-disable-undo proc-buff)
      (erase-buffer)

      (let* ((options-file (ycmd--create-options-file hmac-secret))
