~ci-train-bot/location-service/location-service-ubuntu-yakkety-1895

« back to all changes in this revision

Viewing changes to include/location_service/com/ubuntu/location/clock.h

  • Committer: Thomas Voß
  • Date: 2013-05-28 14:20:45 UTC
  • Revision ID: thomas.voss@canonical.com-20130528142045-kq5umqdmm4o53vwk
Initial push.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_CLOCK_H_
 
2
#define LOCATION_SERVICE_COM_UBUNTU_LOCATION_CLOCK_H_
 
3
 
 
4
#include <chrono>
 
5
 
 
6
namespace com
 
7
{
 
8
namespace ubuntu
 
9
{
 
10
namespace location
 
11
{
 
12
struct Clock
 
13
{
 
14
    typedef std::chrono::high_resolution_clock::duration Duration;
 
15
    typedef std::chrono::high_resolution_clock::time_point Timestamp;
 
16
 
 
17
    static inline Timestamp now()
 
18
    {
 
19
        return std::chrono::high_resolution_clock::now();
 
20
    }
 
21
};
 
22
}
 
23
}
 
24
}
 
25
 
 
26
#endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_CLOCK_H_