代码之家  ›  专栏  ›  技术社区  ›  HarryTheProgrammer

在不和谐中。Net机器人,我如何在保持响应的同时等待一定的时间?

  •  -1
  • HarryTheProgrammer  · 技术社区  · 9 年前

    Wait for 30 seconds while checking for input
    If I have found input within this 30 seconds, echo it in the current channel.
    If not, call the DoStuff() method.
    

    我如何在C语言中实现这一点?上面这件事只是一个例子,显然不是真的。

    1 回复  |  直到 9 年前
        1
  •  0
  •   blankpanda    9 年前

    除非有分歧。Net有一些支持您的问题的内置功能,您可以使用多线程来实现这一点。

    我建议看一下 this website 如果您选择采用多线程方法。