Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 C++ 中,我usleep在“主”路径中使用并在out之前调用该函数。
usleep
out
out(); usleep(4000000);
out只是在屏幕上打印一些东西。不幸的是,它仅在 4 秒后才出现在屏幕上,尽管该命令在 sleep 命令之前。这个怎么可能?
PHP 正在缓冲写入 HTTP 客户端的数据。使用flush():
flush()
out(); flush(); usleep(4000000);