From f2b92d77b59f6bcb55f33ee69d640b9b9b77c348 Mon Sep 17 00:00:00 2001 From: dongdaxiang Date: Sun, 16 Dec 2018 20:02:44 +0800 Subject: [PATCH] remove clock time in WIN32 mode --- paddle/fluid/framework/async_executor.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/fluid/framework/async_executor.h b/paddle/fluid/framework/async_executor.h index a82e941559..95c8472b2f 100644 --- a/paddle/fluid/framework/async_executor.h +++ b/paddle/fluid/framework/async_executor.h @@ -34,9 +34,13 @@ namespace paddle { namespace framework { inline double current_realtime() { +#if !defined(_WIN32) struct timespec tp; clock_gettime(CLOCK_REALTIME, &tp); return tp.tv_sec + tp.tv_nsec * 1e-9; +#else + return 0.0; +#endif } inline std::default_random_engine& local_random_engine() { -- GitLab