commit | author | age
|
e8c910
|
1 |
#include "bom.hpp" |
16b655
|
2 |
#include "book.hpp" |
JG |
3 |
#include "json.hpp" |
|
4 |
#include "protocol.hpp" |
|
5 |
#include <chrono> |
e8c910
|
6 |
#include <iostream> |
4fdb65
|
7 |
#include <unistd.h> |
JG |
8 |
#include <unordered_map> |
16b655
|
9 |
|
JG |
10 |
int main(void) |
|
11 |
{ |
2c515f
|
12 |
// book::Book b = book::testBook(10, true); |
e8c910
|
13 |
auto bs = protocol::recoverBook(); |
JG |
14 |
// protocol::catchUp(bs); |
|
15 |
// std::cout << bs.size() << std::endl; |
|
16 |
// for (auto i : bs) { |
|
17 |
// std::cout << i.first << std::endl; |
|
18 |
// i.second.printBook(); |
|
19 |
// } |
|
20 |
bom::initialise(); |
|
21 |
bom::updateBom(bs); |
|
22 |
bom::destroy(); |
|
23 |
protocol::catchUp(bs); |
|
24 |
std::cout << bs.size() << std::endl; |
|
25 |
for (auto& i : bs) { |
d2cfd3
|
26 |
std::cout << i.first << ", " << i.second.expiry.count() << ", " << i.second.bomPrice << std::endl; |
e8c910
|
27 |
i.second.printBook(); |
JG |
28 |
} |
16b655
|
29 |
} |