diff options
author | Kenneth Heafield <github@kheafield.com> | 2011-11-15 20:37:05 +0400 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2011-11-15 20:37:05 +0400 |
commit | 417b1e6b582f4061e0db94f552713d3efb171143 (patch) | |
tree | 07ef80831275a35aaf68e993e0b3623c70219972 /kenlm | |
parent | d7bd58c6f5feaf5090710f124491354f9083ad7d (diff) |
Remove timeval on windows
Diffstat (limited to 'kenlm')
-rw-r--r-- | kenlm/lm/ngram_query.cc | 2 | ||||
-rw-r--r-- | kenlm/util/portability.hh | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/kenlm/lm/ngram_query.cc b/kenlm/lm/ngram_query.cc index 1a87bef60..6e9874673 100644 --- a/kenlm/lm/ngram_query.cc +++ b/kenlm/lm/ngram_query.cc @@ -12,9 +12,11 @@ #include <sys/time.h> #endif +#if !defined(_WIN32) && !defined(_WIN64) float FloatSec(const struct timeval &tv) { return static_cast<float>(tv.tv_sec) + (static_cast<float>(tv.tv_usec) / 1000000000.0); } +#endif void PrintUsage(const char *message) { #if !defined(_WIN32) && !defined(_WIN64) diff --git a/kenlm/util/portability.hh b/kenlm/util/portability.hh index 7066f50f5..acbc01922 100644 --- a/kenlm/util/portability.hh +++ b/kenlm/util/portability.hh @@ -32,18 +32,6 @@ int ftruncate(FD, unsigned int); long lrint(float); -/* -struct timeval -{ - float tv_sec, tv_usec; -}; - -struct rusage -{ - timeval ru_utime, ru_stime; -}; -*/ - //inline int getrusage(int, struct rusage*) { return 0; } //extern int RUSAGE_SELF; |