diff --git a/paddle/fluid/framework/async_executor.h b/paddle/fluid/framework/async_executor.h index a82e9415596b6f7d8b2e2030f7b44718f7320a15..95c8472b2f3b6b0c2d95fcf0c0b6f00e7f39b032 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() {