 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Schemas
 
+(def WholeSeconds schema/Int)
+(def WholeMilliseconds schema/Int)
+
 (def ServiceStatusDetailLevel
   (schema/enum :critical :info :debug))
 

  string describing the error."
  [status-fn :- StatusFn
   level :- ServiceStatusDetailLevel
   timeout :- schema/Int]
   (let [unknown-response (fn [status] {:state :unknown
                                        :status status})
         timeout-response (unknown-response (format "Status check timed out after %s seconds" timeout))]

    (validation-error-explain schema-failure)
    schema-failure))

(schema/defn check-timeout :- WholeSeconds
  "Given a status level keyword, returns an integral number of seconds to use as
  a timeout when calling a status function."
  [level :- ServiceStatusDetailLevel]
  (case level
    :critical 5
