Merge "Enable atspi" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / system / common / frame-time-stamp.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/system/common/frame-time-stamp.h>
20
21 namespace Dali
22 {
23 namespace Internal
24 {
25 namespace Adaptor
26 {
27 FrameTimeStamp::FrameTimeStamp()
28 : frame(0),
29   microseconds(0),
30   bufferIndex(0)
31 {
32 }
33
34 FrameTimeStamp::FrameTimeStamp(unsigned int frame,
35                                uint64_t     microseconds,
36                                unsigned int bufferIndex)
37 : frame(frame),
38   microseconds(microseconds),
39   bufferIndex(bufferIndex)
40 {
41 }
42
43 FrameTimeStamp::FrameTimeStamp(unsigned int bufferIndex)
44 : frame(0),
45   microseconds(0),
46   bufferIndex(bufferIndex)
47 {
48 }
49
50 unsigned int FrameTimeStamp::MicrosecondDiff(const FrameTimeStamp& start, const FrameTimeStamp& end)
51 {
52   return end.microseconds - start.microseconds;
53 }
54
55 } // namespace Adaptor
56
57 } // namespace Internal
58
59 } // namespace Dali