您好, 我写一个程序,我需要确保一定的变数,在这种情况下,正确的数字IP地址。 所以我想创建一个线程来检查,如果IP地址发生变化,每5分钟,我还没有写代码,但它看起来像东西 while(true) { Sleep(300000); //5 minutes GetIPAddres(); if different updates working thread } 因此,我如何更新我的工作在这种情况下,线程将是主要的变量的变化,它的内容时,
while(true) { Sleep(300000); //5 minutes GetIPAddres(); if different updates working thread }