Skip to content

Commit 2ad7a98

Browse files
committed
Latecy example: moved timestap into the loop
1 parent bdcb152 commit 2ad7a98

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/7-Latency.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ int main(int argc, char *argv[]) {
3434
std::exit(EXIT_FAILURE);
3535
}
3636

37-
auto timestamp = std::chrono::system_clock::now();
38-
3937
for (;;) {
38+
auto timestamp = std::chrono::system_clock::now();
4039
Monitoring::Get().send(
4140
Metric{999, "latencyTestMetric"}.addTags(
4241
{{"libraryTimestamp", std::to_string(

0 commit comments

Comments
 (0)