File: timer.cc

package info (click to toggle)
libosl 0.8.0-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,328 kB
  • sloc: cpp: 114,345; ruby: 1,290; ansic: 915; makefile: 431; perl: 309; sh: 35
file content (17 lines) | stat: -rw-r--r-- 256 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "osl/real_time.h"
#include <iostream>

int
main ()
{
  osl::RealTime realTime (10);

  while (realTime.timeLeft ())
    {
      long tlis = realTime.getTimeLeftApprox ();
      std::cout << tlis << std::endl;
      sleep (1);
    }

  return 0;
}