diff options
author | David Madl <git@abanbytes.eu> | 2015-11-10 17:01:05 +0300 |
---|---|---|
committer | David Madl <git@abanbytes.eu> | 2015-11-17 19:15:13 +0300 |
commit | 3b6393094394cd19eee61b64e467b055a88033d4 (patch) | |
tree | 7f7b2afe19ae7a30a85556e7263b7608098fe19e /moses/Timer.h | |
parent | 0dd6c31f638de16bd9dd6abb3113e15b719dce2c (diff) |
move global Timer to Timer.h
Move ResetUserTime(), PrintUserTime(), GetUserTime() to Timer.h
Do not reset timer in StaticData.
Diffstat (limited to 'moses/Timer.h')
-rw-r--r-- | moses/Timer.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/moses/Timer.h b/moses/Timer.h index 0471fafe1..fe6066788 100644 --- a/moses/Timer.h +++ b/moses/Timer.h @@ -9,6 +9,21 @@ namespace Moses { +// A couple of utilities to measure decoding time + +/** Start global timer. */ +void ResetUserTime(); + +/** Print out an optional message followed by the current global timer timing. */ +void PrintUserTime(const std::string &message); + +/** + * Total wall time that the global timer has been in the "running" + * state since it was first "started". + */ +double GetUserTime(); + + /** Wrapper around time_t to time how long things have been running * according to walltime. We avoid CPU time since it is less reliable * in a multi-threaded environment and can spuriously include clock cycles |