C++Guns – RoboBlog


C++ Guns: ACPL proudly presents: ElapsedTimer

Filed under: Allgemein — Tags: — Thomas @ 13:11

ElapsedTimer: Measure amount of time with a monotonic clock.


#include <iostream>
#include <thread>

#include <core/util/ElapsedTimer.hpp>

using namespace acpl;
using namespace std::chrono_literals;

int main() {
    std::cout << "Start timer and wait for 2 seconds ...\n";
    auto timer = ElapsedTimer::create();
    std::cout << timer.elapsed().count() << " seconds later\n";
    return 0;

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress