代码描述如下:for xx do print(开始:nowtime) 发送一个不同http请求,并等待回复 print(结束:nowtime)end问题:我发现竟然有开始时间、结束时间一样的情况,而且发送的并不是一个http请求,就像是在并行执行一样,求教这是为什么? 谢谢!
syntax: secs = ngx.now()Returns a floating-point number for the elapsed time in seconds (including milliseconds as the decimal part) from the epoch for the current time stamp from the nginx cached time (no syscall involved unlike Lua's date library).You can forcibly update the Nginx time cache by calling ngx.update_time first.
syntax: ngx.update_time()Forcibly updates the Nginx current time cache. This call involves a syscall and thus has some overhead, so do not abuse it.
我的意思是两次循环的开始时间相同,不是单次循环开始和结束时间相同在 2017年8月7日星期一 UTC+8下午4:13:53,huwei...@gmail.com写道:代码描述如下:for xx do print(开始:nowtime) 发送一个不同http请求,并等待回复 print(结束:nowtime)end问题:我发现竟然有开始时间、结束时间一样的情况,而且发送的并不是一个http请求,就像是在并行执行一样,求教这是为什么? 谢谢! --