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.
我想从用户那里获取字符串并将时间限制为 5 秒,如果他这次没有输入字符串,打印 messege "no more time, bye!" 怎么做?感谢您
您可以使用类似的方式监控键盘并将其包含在定时循环中。