Skip to content
Snippets Groups Projects
Commit d6862d28 authored by Maxime POULAIN's avatar Maxime POULAIN
Browse files

add time stamp

parent b7e914b6
Branches
No related tags found
No related merge requests found
......@@ -154,6 +154,8 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
......
......@@ -4,8 +4,10 @@
#include "utils.h"
#include <iostream>
#include <vector>
#include <chrono>
using namespace std;
using namespace std::chrono;
int main() {
srand(21058497);
......@@ -15,6 +17,8 @@ int main() {
int best = INT16_MAX;
auto before = duration_cast<milliseconds>(system_clock::now().time_since_epoch());
for (int i = 0; i < 100; i++)
{
bierwirth v = generateVector(graph.nb_pieces, graph.nb_machines);
......@@ -27,7 +31,9 @@ int main() {
}
}
auto after = duration_cast<milliseconds>(system_clock::now().time_since_epoch());
cout << best << endl;
cout << after.count() - before.count() << " ms" << endl;
return 0;
......
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment