From 7258305cb3219035821eb08997418c01b053e19e Mon Sep 17 00:00:00 2001 From: Yuanle Song <sylecn@gmail.com> Date: Tue, 8 Sep 2015 11:35:15 +0800 Subject: [PATCH] v1.0.1 bug fix: time duration calculation param order is wrong --- apache2-log-parser.cabal | 2 +- src/Main.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apache2-log-parser.cabal b/apache2-log-parser.cabal index 199bb89..64d0537 100644 --- a/apache2-log-parser.cabal +++ b/apache2-log-parser.cabal @@ -1,5 +1,5 @@ name: apache2-log-parser -version: 1.0.0 +version: 1.0.1 synopsis: Simple project template from stack description: Please see README.md homepage: http://github.com/githubuser/apache2-log-parser#readme diff --git a/src/Main.hs b/src/Main.hs index 0ccea9a..902c1a7 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -193,7 +193,7 @@ parseFile args = do let linesParsed = length logs finishTime <- getCurrentTime -- duration in seconds - let duration = (round . toRational) (diffUTCTime startTime finishTime) + let duration = (round . toRational) (diffUTCTime finishTime startTime) if duration == 0 then printf "parsed %d lines instantly.\n" linesParsed else -- GitLab