1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // Platform-ios.cpp
- //
- // Created by 杜家兑macbook on 17/2/11.
- //
- #import <Foundation/Foundation.h>
- #include "RUPlatform.h"
- USING_NS_CC;
- NS_RU_BEGIN
- static Platform *g_Platform = nullptr;
- Platform* Platform::getInstance()
- {
- if (g_Platform == nullptr)
- {
- g_Platform = new (std::nothrow) Platform;
- }
- return g_Platform;
- }
- void Platform::reportLog(string log){
-
- }
- void Platform::vibrate(int duration, int strength) {
-
- }
- double Platform::getSystemUpTime(){
- //返回用户开机了多少秒
- double second = [[NSProcessInfo processInfo] systemUptime];
- return second;
- }
- NS_RU_END
|