nikita-volkov / hasql-pool

A pool of connections for Hasql
http://hackage.haskell.org/package/hasql-pool
MIT License
17 stars 15 forks source link

Switch from microseconds to seconds as unit for timeout #24

Closed nikita-volkov closed 2 years ago

nikita-volkov commented 2 years ago

I can't imagine a case where one would need a resolution higher than second for timeout.

@robx what do you think?

robx commented 2 years ago

I don't that's a particularly good idea, I wouldn't want to restrict the API arbitrarily.

E.g. one might well want lower timeouts when writing tests.

I guess the benefit would be less 1000000s in code? How about if we pass the timeout as a nice duration type, I suppose the default there would be Data.Time.NominalDiffTime?

nikita-volkov commented 2 years ago

DiffTime should be better. But okay I get it. We can leave it as is for now.