~lukas-kde/miral/shellchrome-windowinfo

« back to all changes in this revision

Viewing changes to miral-qt/src/modules/Unity/Application/timesource.cpp

  • Committer: Larry Price
  • Date: 2016-09-13 16:19:29 UTC
  • mto: (330.4.1 miral)
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: larry.price@canonical.com-20160913161929-vs9ka1capmljq1es
Removing miral-qt from release branch, updating copyright file, and adding GPL3 license to root dir

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2015 - Canonical Ltd.
3
 
 *
4
 
 * This program is free software: you can redistribute it and/or modify it
5
 
 * under the terms of the GNU Lesser General Public License, as
6
 
 * published by the  Free Software Foundation; either version 2.1 or 3.0
7
 
 * of the License.
8
 
 *
9
 
 * This program is distributed in the hope that it will be useful, but
10
 
 * WITHOUT ANY WARRANTY; without even the implied warranties of
11
 
 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
12
 
 * PURPOSE.  See the applicable version of the GNU Lesser General Public
13
 
 * License for more details.
14
 
 *
15
 
 * You should have received a copy of both the GNU Lesser General Public
16
 
 * License along with this program. If not, see <http://www.gnu.org/licenses/>
17
 
 *
18
 
 */
19
 
 
20
 
#include "timesource.h"
21
 
 
22
 
#include <QElapsedTimer>
23
 
 
24
 
namespace qtmir {
25
 
class RealTimeSourcePrivate {
26
 
public:
27
 
    QElapsedTimer timer;
28
 
};
29
 
}
30
 
 
31
 
using namespace qtmir;
32
 
 
33
 
RealTimeSource::RealTimeSource()
34
 
    : TimeSource()
35
 
    , d(new RealTimeSourcePrivate)
36
 
{
37
 
    d->timer.start();
38
 
}
39
 
 
40
 
RealTimeSource::~RealTimeSource()
41
 
{
42
 
    delete d;
43
 
}
44
 
 
45
 
qint64 RealTimeSource::msecsSinceReference()
46
 
{
47
 
    return d->timer.elapsed();
48
 
}