Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <fishandfrolick@gmail.com>2013-02-21 05:09:05 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2013-02-21 05:09:05 +0400
commiteb789874eac3c81f412c738d12fa7bd2911decfd (patch)
tree2dceda13b4e3d71e955abc8ed95c89561990ae23 /moses/Timer.cpp
parenta0927b98e6c72568a1a423a976ea38ecdefa8d60 (diff)
delete CLOCK_MONOTONIC
Diffstat (limited to 'moses/Timer.cpp')
-rw-r--r--moses/Timer.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/moses/Timer.cpp b/moses/Timer.cpp
index 318c6a410..bbe1bcabd 100644
--- a/moses/Timer.cpp
+++ b/moses/Timer.cpp
@@ -15,17 +15,9 @@ namespace Moses
*/
double Timer::elapsed_time()
{
-#ifdef CLOCK_MONOTONIC
- struct timespec now;
- clock_gettime(CLOCK_MONOTONIC, &now);
- double elapsed = (now.tv_sec - start_time.tv_sec);
- elapsed += (now.tv_nsec - start_time.tv_nsec) / 1000000000.0;
- return elapsed;
-#else
time_t now;
time(&now);
return difftime(now, start_time);
-#endif
}
/***
@@ -56,11 +48,7 @@ void Timer::start(const char* msg)
running = true;
// Set the start time;
-#ifdef CLOCK_MONOTONIC
- clock_gettime(CLOCK_MONOTONIC, &start_time);
-#else
time(&start_time);
-#endif
}
/***