Could someone tell me the code for a timer like 60 seconds from when the first input is?

Also code for a user not being able to enter a password for 1 hour if they have inserted it incorrect?


thanks guys

1) Sleep(60*1000); -- MS-Windows, *nix is the same except use sleep(60) instead of Sleep()

2) best to write the last time to some external file, such as the registry or a file, so that your program can continue to do other things during that lengthly time. Then once each hour check that registry entry or file to see if the time has expired.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.