-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathclock.cpp
More file actions
43 lines (34 loc) · 894 Bytes
/
Copy pathclock.cpp
File metadata and controls
43 lines (34 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* main.cpp
*
* Created on: 2014.01.09.
* Author: istvan_vig
*/
#include <iostream>
#include "ClockData.h"
#include "CLIClock.h"
using namespace std;
int main(int argc, char* argv[]) {
ClockData *c = new ClockData();
CLIClock *cc = new CLIClock();
c->MethodType = ClockData::mLocalSystem;
if(argc>=2) {
int tl = atoi(argv[1]);
cc->setTimelineLen(tl);
}
while(true) {
c->_get();
//cout << c->getHour() << ":" << c->getMinute() << endl;
//cout << "Hour divider: " << c->getHourDivider() << ", minute divider: " << c->getMinuteDivider() << endl;
cc->setHourPos(c->getHourDivider());
cc->setMinPos(c->getMinuteDivider());
cc->setSecPos(c->getSecondDivider());
cc->setHour(c->getHour());
cc->setMinute(c->getMinute());
cc->setSecond(c->getSecond());
cc->show();
Sleep(500);
}
delete cc;
delete c;
}