SVN / public / code / vorlesung-09 / TimerDemoMain.cpp

Revision 8201
Date
Committerhb1003
Download
// Copyright 2026, University of Freiburg
// Chair of Algorithms and Data Structures
// Author: Hannah Bast <bast@cs.uni-freiburg.de>

#include "Timer.h"
#include <iostream>
#include <unistd.h>

int main() {
  Timer timer;
  usleep(666'666);
  std::cout << "Time passed since start " << timer << std::endl;
  // std::cout << "Time passed since start " << timer.msecsSinceStart() << " ms"
  //           << std::endl;
  usleep(333'333);
  std::cout << "Time passed since start " << timer << std::endl;
  // std::cout << "Time passed since start " << timer.msecsSinceStart() << " ms"
  //           << std::endl;
  return 0;
}