Merge "Flow control for DataControl" into tizen_2.1
[platform/framework/native/appfw.git] / src / system / FSysSystemTime.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FSysSystemTime.cpp
20  * @brief               This is the implementation file for SystemTime class.
21  */
22
23 #include <sys/sysinfo.h>
24 #include <sys/time.h>
25 #include <time.h>
26
27 #include <FBaseDateTime.h>
28 #include <FBaseResult.h>
29
30 #include <FBaseSysLog.h>
31 #include <FSys_SystemTimeImpl.h>
32
33 using namespace Tizen::Base;
34 using namespace Tizen::Locales;
35 namespace Tizen { namespace System
36 {
37
38 SystemTime::SystemTime(void)
39         :__pSystemTimeImpl(null)
40 {
41 }
42
43 SystemTime::~SystemTime(void)
44 {
45 }
46
47 result
48 SystemTime::GetUptime(TimeSpan& uptime)
49 {
50         return _SystemTimeImpl::GetUptime(uptime);
51 }
52
53 result
54 SystemTime::GetCurrentTime(TimeMode timeMode, DateTime& currentTime)
55 {
56         return _SystemTimeImpl::GetCurrentTime(timeMode, currentTime);
57 }
58
59 result
60 SystemTime::GetCurrentTime(DateTime& currentTime)
61 {
62         return _SystemTimeImpl::GetCurrentTime(currentTime);
63 }
64
65 result
66 SystemTime::GetTicks(long long& ticks)
67 {
68         return _SystemTimeImpl::GetTicks(ticks);
69 }
70
71 result
72 SystemTime::SetCurrentTime(const DateTime& currentTime)
73 {
74         return _SystemTimeImpl::SetCurrentTime(currentTime);
75 }
76
77 } } // Tizen::System