forked from HowardHinnant/date
Time something real.
This commit is contained in:
@@ -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:
|
||||
</p>
|
||||
|
||||
<blockquote><pre>
|
||||
104ns
|
||||
682580ns
|
||||
</pre></blockquote>
|
||||
|
||||
<p>
|
||||
@@ -136,12 +139,13 @@ different units on your platform), and the output automatically changes units fo
|
||||
|
||||
<blockquote><pre>
|
||||
auto t0 = system_clock::now();
|
||||
f();
|
||||
auto t1 = system_clock::now();
|
||||
std::cout << t1 - t0 << '\n';
|
||||
</pre></blockquote>
|
||||
|
||||
<blockquote><pre>
|
||||
0µs
|
||||
682µs
|
||||
</pre></blockquote>
|
||||
|
||||
<p>
|
||||
|
Reference in New Issue
Block a user