]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Prelude/Clock.hs
[FIX] map list size filtered (others terms do not appear any more)
[gargantext.git] / src / Gargantext / Prelude / Clock.hs
1 {-|
2 Module : Gargantext.Prelude.Clock
3 Description : Useful Tools near Prelude of the project
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
8 Portability : POSIX
9
10 -}
11
12 module Gargantext.Prelude.Clock
13 where
14
15 import Formatting.Clock (timeSpecs)
16 import Formatting.Internal (Format(..))
17 import Gargantext.Prelude
18 import qualified System.Clock as Clock (getTime, TimeSpec, Clock(..))
19
20 ---------------------------------------------------------------------------------
21 getTime :: MonadBase IO m => m Clock.TimeSpec
22 getTime = liftBase $ Clock.getTime Clock.ProcessCPUTime
23
24 hasTime :: Formatting.Internal.Format r (Clock.TimeSpec -> Clock.TimeSpec -> r)
25 hasTime = timeSpecs
26
27