aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/benchmark/benchmark_model.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/tools/benchmark/benchmark_model.cc')
-rw-r--r--tensorflow/tools/benchmark/benchmark_model.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/tools/benchmark/benchmark_model.cc b/tensorflow/tools/benchmark/benchmark_model.cc
index 0fcfaf747b..db2ac31baf 100644
--- a/tensorflow/tools/benchmark/benchmark_model.cc
+++ b/tensorflow/tools/benchmark/benchmark_model.cc
@@ -36,6 +36,7 @@ limitations under the License.
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/init_main.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/util/command_line_flags.h"
@@ -272,7 +273,11 @@ Status TimeMultipleRuns(double sleep_seconds, int num_runs,
// This can be helpful to determine the effect of mobile processor
// scaling and thermal throttling.
if (sleep_seconds > 0.0) {
+#ifdef PLATFORM_WINDOWS
+ Sleep(sleep_seconds * 1000);
+#else
nanosleep(&req, nullptr);
+#endif
}
}
std::stringstream stream;