From 4e3a40a6dd9161904468b6adf7f2583af86526dd Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sat, 30 Jul 2016 23:15:02 -0400 Subject: [PATCH] Time something real. --- chrono_io.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrono_io.html b/chrono_io.html index 3b398f4..5485352 100644 --- a/chrono_io.html +++ b/chrono_io.html @@ -107,12 +107,15 @@ a library such as this. #include "chrono_io.h" #include <iostream> +void f(); + int main() { using namespace date; using namespace std::chrono; auto t0 = steady_clock::now(); + f(); auto t1 = steady_clock::now(); std::cout << t1 - t0 << '\n'; } @@ -126,7 +129,7 @@ for example:

-104ns
+682580ns
 

@@ -136,12 +139,13 @@ different units on your platform), and the output automatically changes units fo

 auto t0 = system_clock::now();
+f();
 auto t1 = system_clock::now();
 std::cout << t1 - t0 << '\n';
 
-0µs
+682µs