Skip to content

Instantly share code, notes, and snippets.

@BornThisWay
BornThisWay / delay_loop.cpp
Last active December 15, 2015 07:59
Wait for a period of time: write delay loop
#include <iostream>
#include <ctime>
int main()
{
using namespace std;
cout << "Enter the delay time, in seconds: ";
float secs;
cin >> secs;
clock_t delay = secs * CLOCKS_PER_SEC;