Revision 46300ac2 htools/Ganeti/Confd/Utils.hs
b/htools/Ganeti/Confd/Utils.hs | ||
---|---|---|
31 | 31 |
, parseRequest |
32 | 32 |
, parseMessage |
33 | 33 |
, signMessage |
34 |
, getCurrentTime |
|
34 | 35 |
) where |
35 | 36 |
|
36 | 37 |
import qualified Data.ByteString as B |
37 | 38 |
import qualified Text.JSON as J |
39 |
import System.Time |
|
38 | 40 |
|
39 | 41 |
import Ganeti.BasicTypes |
40 | 42 |
import Ganeti.Confd.Types |
... | ... | |
80 | 82 |
, signedMsgHmac = hmac |
81 | 83 |
} |
82 | 84 |
where hmac = computeMac key (Just salt) msg |
85 |
|
|
86 |
-- | Returns the current time. |
|
87 |
getCurrentTime :: IO Integer |
|
88 |
getCurrentTime = do |
|
89 |
TOD ctime _ <- getClockTime |
|
90 |
return ctime |
Also available in: Unified diff