basex-client-0.1.0.0: src/Example.hs
module Example where
import BaseXClient
import System.CPUTime
import Text.Printf
main :: IO ()
main = do
start <- getCPUTime
withSession "localhost" 1984 "admin" "admin" $ \session ->
execute session "xquery 1 to 10" >>= print
end <- getCPUTime
let diff = fromIntegral (end - start) / (10 ^ 12)
printf "Computation time: %0.3f sec\n" (diff :: Double)