imay commented on a change in pull request #3211: use SleepFor() instead of usleep() URL: https://github.com/apache/incubator-doris/pull/3211#discussion_r399016712
########## File path: be/src/exprs/utility_functions.cpp ########## @@ -17,27 +17,25 @@ #include "exprs/utility_functions.h" -#include "exprs/expr.h" #include "exprs/anyval_util.h" -#include "util/debug_util.h" +#include "exprs/expr.h" #include "runtime/tuple_row.h" +#include "util/debug_util.h" namespace doris { -void UtilityFunctions::init() { -} +void UtilityFunctions::init() {} StringVal UtilityFunctions::version(FunctionContext* ctx) { return AnyValUtil::from_string_temp(ctx, "5.1.0"); } -BooleanVal UtilityFunctions::sleep( - FunctionContext* ctx, const IntVal& milliseconds) { +BooleanVal UtilityFunctions::sleep(FunctionContext* ctx, const IntVal& milliseconds) { if (milliseconds.is_null) { return BooleanVal::null(); } - usleep(milliseconds.val * 1000 * 1000); + usleep(milliseconds.val * 1000 * 1000); // TODO(hw): ms * 1000 * 1000 = ns Review comment: why not change this? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org