• <tfoot id='DDEh5'></tfoot>

  • <small id='DDEh5'></small><noframes id='DDEh5'>

  • <legend id='DDEh5'><style id='DDEh5'><dir id='DDEh5'><q id='DDEh5'></q></dir></style></legend>

        <i id='DDEh5'><tr id='DDEh5'><dt id='DDEh5'><q id='DDEh5'><span id='DDEh5'><b id='DDEh5'><form id='DDEh5'><ins id='DDEh5'></ins><ul id='DDEh5'></ul><sub id='DDEh5'></sub></form><legend id='DDEh5'></legend><bdo id='DDEh5'><pre id='DDEh5'><center id='DDEh5'></center></pre></bdo></b><th id='DDEh5'></th></span></q></dt></tr></i><div id='DDEh5'><tfoot id='DDEh5'></tfoot><dl id='DDEh5'><fieldset id='DDEh5'></fieldset></dl></div>
          <bdo id='DDEh5'></bdo><ul id='DDEh5'></ul>

        如何在 C++ 程序中添加定时延迟?

        How do you add a timed delay to a C++ program?(如何在 C++ 程序中添加定时延迟?)

        <i id='9cKoH'><tr id='9cKoH'><dt id='9cKoH'><q id='9cKoH'><span id='9cKoH'><b id='9cKoH'><form id='9cKoH'><ins id='9cKoH'></ins><ul id='9cKoH'></ul><sub id='9cKoH'></sub></form><legend id='9cKoH'></legend><bdo id='9cKoH'><pre id='9cKoH'><center id='9cKoH'></center></pre></bdo></b><th id='9cKoH'></th></span></q></dt></tr></i><div id='9cKoH'><tfoot id='9cKoH'></tfoot><dl id='9cKoH'><fieldset id='9cKoH'></fieldset></dl></div>
        • <tfoot id='9cKoH'></tfoot>
            <tbody id='9cKoH'></tbody>

            <small id='9cKoH'></small><noframes id='9cKoH'>

                <bdo id='9cKoH'></bdo><ul id='9cKoH'></ul>

                1. <legend id='9cKoH'><style id='9cKoH'><dir id='9cKoH'><q id='9cKoH'></q></dir></style></legend>
                  本文介绍了如何在 C++ 程序中添加定时延迟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在 C++ 程序中添加定时延迟,想知道是否有人对我可以尝试的内容或可以查看的信息有任何建议?

                  I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at?

                  我希望我有更多关于我如何实现这个定时延迟的详细信息,但在我有更多关于如何添加一个定时延迟的信息之前,我不确定我应该如何尝试实现这个.

                  I wish I had more details on how I am implementing this timed delay, but until I have more information on how to add a timed delay I am not sure on how I should even attempt to implement this.

                  推荐答案

                  在 Win32 中:

                  #include<windows.h>
                  Sleep(milliseconds);
                  

                  在 Unix 中:

                  #include<unistd.h>
                  unsigned int microsecond = 1000000;
                  usleep(3 * microsecond);//sleeps for 3 second
                  

                  sleep() 只需要几秒钟,这通常太长了.

                  sleep() only takes a number of seconds which is often too long.

                  这篇关于如何在 C++ 程序中添加定时延迟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to print vector#39;s data(如何打印矢量的数据)
                  Visual C++ appends 0xCC (int3) bytes at the end of functions(Visual C++ 在函数末尾附加 0xCC (int3) 字节)
                  How to use a variable inside a _T wrapper?(如何在 _T 包装器中使用变量?)
                  MSVC++ warning flags(MSVC++ 警告标志)
                  How to read file which contains uxxxx in vc++(如何在vc++中读取包含uxxxx的文件)
                  stack overflow error in C++ program(C++程序中的堆栈溢出错误)

                      <i id='Iq0HU'><tr id='Iq0HU'><dt id='Iq0HU'><q id='Iq0HU'><span id='Iq0HU'><b id='Iq0HU'><form id='Iq0HU'><ins id='Iq0HU'></ins><ul id='Iq0HU'></ul><sub id='Iq0HU'></sub></form><legend id='Iq0HU'></legend><bdo id='Iq0HU'><pre id='Iq0HU'><center id='Iq0HU'></center></pre></bdo></b><th id='Iq0HU'></th></span></q></dt></tr></i><div id='Iq0HU'><tfoot id='Iq0HU'></tfoot><dl id='Iq0HU'><fieldset id='Iq0HU'></fieldset></dl></div>
                      1. <tfoot id='Iq0HU'></tfoot>
                      2. <legend id='Iq0HU'><style id='Iq0HU'><dir id='Iq0HU'><q id='Iq0HU'></q></dir></style></legend>
                        • <bdo id='Iq0HU'></bdo><ul id='Iq0HU'></ul>

                            <tbody id='Iq0HU'></tbody>
                        • <small id='Iq0HU'></small><noframes id='Iq0HU'>