Merge "Add Setting feature on system-server lib" into tizen_2.2
[platform/framework/native/appfw.git] / src / system / FSysSystemTime.cpp
1 //
2 // Copyright (c) 2012 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  * @file                FSysSystemTime.cpp
19  * @brief               This is the implementation file for SystemTime class.
20  */
21
22 #include <sys/sysinfo.h>
23 #include <sys/time.h>
24 #include <time.h>
25
26 #include <FBaseDateTime.h>
27 #include <FBaseResult.h>
28
29 #include <FBaseSysLog.h>
30 #include <FSys_SystemTimeImpl.h>
31
32 using namespace Tizen::Base;
33 using namespace Tizen::Locales;
34 namespace Tizen { namespace System
35 {
36
37 SystemTime::SystemTime(void)
38         :__pSystemTimeImpl(null)
39 {
40 }
41
42 SystemTime::~SystemTime(void)
43 {
44 }
45
46 result
47 SystemTime::GetUptime(TimeSpan& uptime)
48 {
49         return _SystemTimeImpl::GetUptime(uptime);
50 }
51
52 result
53 SystemTime::GetCurrentTime(TimeMode timeMode, DateTime& currentTime)
54 {
55         return _SystemTimeImpl::GetCurrentTime(timeMode, currentTime);
56 }
57
58 result
59 SystemTime::GetCurrentTime(DateTime& currentTime)
60 {
61         return _SystemTimeImpl::GetCurrentTime(currentTime);
62 }
63
64 result
65 SystemTime::GetTicks(long long& ticks)
66 {
67         return _SystemTimeImpl::GetTicks(ticks);
68 }
69
70 result
71 SystemTime::SetCurrentTime(const DateTime& currentTime)
72 {
73         return _SystemTimeImpl::SetCurrentTime(currentTime);
74 }
75
76 } } // Tizen::System