标签:
以时间定义事务成败 double time_elapsed, duration, waste; merc_timer_handle_t timer; Action() { lr_start_transaction("ACCP"); timer = lr_start_timer(); lr_think_time(3); time_elapsed = lr_end_timer(timer); // Convert to millisecond.s waste = time_elapsed * 1000; if(waste>3) lr_end_transaction("ACCP", LR_FAIL); else lr_end_transaction("ACCP", LR_PASS); return 0; }
标签:
原文地址:http://www.cnblogs.com/qmfsun/p/4482089.html