// // Platform-ios.cpp // // Created by 杜家兑macbook on 17/2/11. // #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) { } bool Platform::saveToSharedPreferences(const std::string& key, const std::string& base64Data) { return true; } std::string Platform::readFromSharedPreferences(const std::string& key) { return ""; } double Platform::getSystemUpTime(){ //返回用户开机了多少秒 double second = [[NSProcessInfo processInfo] systemUptime]; return second; } int Platform::getServerTime() { return time(nullptr); } /// 显示调试对话框 void Platform::showDbgView() { } NS_RU_END