// // Platform-ios.cpp // // Created by 杜家兑macbook on 17/2/11. // #import #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