aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSanJacobs2022-07-12 03:22:40 +0200
committerSanJacobs2022-07-12 03:22:40 +0200
commita3900c0419c7f3bb3d47834376b610008d6554cf (patch)
tree40932bce85930518dc09488af613d35d9f7717a0 /src/main.cpp
parent55adec80ffefd9a1090209cfe6298ff850dedfc4 (diff)
downloadsatscalc-a3900c0419c7f3bb3d47834376b610008d6554cf.tar.gz
satscalc-a3900c0419c7f3bb3d47834376b610008d6554cf.tar.bz2
satscalc-a3900c0419c7f3bb3d47834376b610008d6554cf.zip
Workdays split into price segments in constructor
Diffstat (limited to 'src/main.cpp')
-rwxr-xr-xsrc/main.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f1dd13f..99e5647 100755
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -111,12 +111,37 @@ int main(int argc, char* argv[])
std::cout << "Copyright 2022 Sander J. Skjegstad.\n";
std::cout << "This is free software with ABSOLUTELY NO WARRENTY.\n";
std::cout << "It does NOT give financial advice.\n\n";
+
+ std::cout << "-----\nStep 0: Setting the dayrate\n\n";
+
+ //int dayrate_input;
+ //std::cout << "What is your dayrate? ";
+ //std::cin >> dayrate_input;
+ const int dayrate = 3338;
+ std::cout << "Dayrate: " << dayrate << "\n";
+ const double hourly_rate = dayrate/7.5;
+ std::cout << "Hourly rate: " << hourly_rate << "\n\n";
std::cout << "-----\nStep 1: Adding the days\n\n";
- bool not_done = true;
- while(not_done) {
+ while(1) {
+ std::cout << "Filling in a test-day, and that's it.\n";
+ std::cout << "Storing multiple workdays in an efficient way will be figured out later." << std::endl;
+
+ workday test_day({0, 0, 1, 1, 1000},
+ {0, 8, 20, 11, 2022},
+ {0, 21, 20, 11, 2022},
+ {0, 18, 20, 11, 2022});
+
+ std::cout << "\nCalltime: " << timeprint(test_day.call) << "\n";
+ std::cout << "Wraptime: " << timeprint(test_day.wrap) << "\n";
+ std::cout << "Planned wrap: " << timeprint(test_day.planned_wrap) << "\n\n";
+
+ for(int i=0; i<test_day.total_timeblocks; i++) {
+ std::cout << "Segment " << i << ": " << timeprint(test_day.blocks[i]) << std::endl;
+ }
+ break;
}
return 0;