diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-27 03:34:51 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-27 03:34:51 +0400 |
commit | 7093d2e2cd0ec361665a1cd8eb7668573b509316 (patch) | |
tree | 47148985ed1cb355d67578914e2eae2afc7d9492 /mert/Util.cpp | |
parent | 3b47348550d485b34b8db3b03a749f7aba6ef86d (diff) |
Change mert/Timer.
- Add a high resolution timing function to measure the
wall-clock time by gettimeofday().
- Now the Timer class use getrusage() to measure the elapsed
CPU time as KenLM does.
- Revive Timer::restart().
- Add Timer::ToString() for reporting the detail statistics
as well as for debugging.
- Add a simple unit test for Timer.
Diffstat (limited to 'mert/Util.cpp')
-rw-r--r-- | mert/Util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mert/Util.cpp b/mert/Util.cpp index fee1efd81..952aaf9aa 100644 --- a/mert/Util.cpp +++ b/mert/Util.cpp @@ -84,5 +84,5 @@ void PrintUserTime(const std::string &message) double GetUserTime() { - return g_timer.get_elapsed_time(); + return g_timer.get_elapsed_cpu_time(); } |