Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <time.h>
- #include <ctime>
- #include <conio.h>
- #include <iostream>
- #include <cstdlib>
- #include <synchapi.h>
- #include <string>
- using namespace std;
- class Stoper
- {
- public:
- unsigned long msek;
- unsigned long sek;
- unsigned long min;
- unsigned long godz;
- public:
- Stoper ()
- {
- msek = 0;
- sek = 0;
- min = 0;
- godz = 0;
- }
- void Obliczenie1()
- {
- if (msek == 1000)
- {
- sek++;
- msek = 0;
- }
- if (sek >= 59)
- {
- min++;
- sek = 0;
- }
- if (min >= 59)
- {
- godz++;
- min = 0;
- }
- }
- void Ustawienie()
- {
- system("cls");
- cout << godz << " : " << min << " : " << sek " : "
- Sleep(1000);
- }
- };
- int main() {
- string 1;
- string 2;
- Stoper dzialania;
- for(;;) {
- dzialania.Ustawienie();
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment