示例#1
0
RSPrivate void __RSTimeZoneInitialize()
{
    _RSTimeZoneTypeID = __RSRuntimeRegisterClass(&__RSTimeZoneClass);
    __RSRuntimeSetClassTypeID(&__RSTimeZoneClass, _RSTimeZoneTypeID);

    __RSTimeZoneKnownNames = __RSTimeZoneKnownNamesArrayCreate();
}
示例#2
0
RSPrivate void __RSDateInitialize()
{
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
    struct mach_timebase_info info;
    mach_timebase_info(&info);
    __RSTSRRate = (1.0E9 / (double)info.numer) * (double)info.denom;
    __RS1_TSRRate = 1.0 / __RSTSRRate;
#elif DEPLOYMENT_TARGET_WINDOWS
    LARGE_INTEGER freq;
    if (!QueryPerformanceFrequency(&freq)) {
        HALT;
    }
    __RSTSRRate = (double)freq.QuadPart;
    __RS1_TSRRate = 1.0 / __RSTSRRate;
#elif DEPLOYMENT_TARGET_LINUX
    struct timespec res;
    if (clock_getres(CLOCK_MONOTONIC, &res) != 0) {
        HALT;
    }
    __RSTSRRate = res.tv_sec + (1000000000 * res.tv_nsec);
    __RS1_TSRRate = 1.0 / __RSTSRRate;
#else
#error Unable to initialize date
#endif
    __RSDateTypeID = __RSRuntimeRegisterClass(&__RSDateClass);
    __RSRuntimeSetClassTypeID(&__RSDateClass, __RSDateTypeID);
}
示例#3
0
RSPrivate void __RSQueueInitialize()
{
    _RSQueueTypeID = __RSRuntimeRegisterClass(&__RSQueueClass);
    __RSRuntimeSetClassTypeID(&__RSQueueClass, _RSQueueTypeID);
}
RSPrivate void __RSDistributedModuleInitialize()
{
    __RSDistributedModuleTypeID = __RSRuntimeRegisterClass(&__RSDistributedModuleClass);
    __RSRuntimeSetClassTypeID(&__RSDistributedModuleClass, __RSDistributedModuleTypeID);
}
示例#5
0
RSPrivate void __RSErrorInitialize()
{
    __RSErrorTypeID = __RSRuntimeRegisterClass(&__RSErrorClass);
    __RSRuntimeSetClassTypeID(&__RSErrorClass, __RSErrorTypeID);
}
示例#6
0
static void __RSProcessInfoInitialize(void) {
    _RSProcessInfoTypeID = __RSRuntimeRegisterClass(&__RSProcessInfoClass);
    __RSRuntimeSetClassTypeID(&__RSProcessInfoClass, _RSProcessInfoTypeID);
}
示例#7
0
static void __RSTimerInitialize()
{
    _RSTimerTypeID = __RSRuntimeRegisterClass(&__RSTimerClass);
    __RSRuntimeSetClassTypeID(&__RSTimerClass, _RSTimerTypeID);
}
示例#8
0
static void __RSRenrenFriendInitialize()
{
    _RSRenrenFriendTypeID = __RSRuntimeRegisterClass(&__RSRenrenFriendClass);
    __RSRuntimeSetClassTypeID(&__RSRenrenFriendClass, _RSRenrenFriendTypeID);
}
示例#9
0
static void __RSCoreUSBDeviceInitialize() {
    _RSCoreUSBDeviceTypeID = __RSRuntimeRegisterClass(&__RSCoreUSBDeviceClass);
    __RSRuntimeSetClassTypeID(&__RSCoreUSBDeviceClass, _RSCoreUSBDeviceTypeID);
}
示例#10
0
RSPrivate void __RSCalendarInitialize()
{
    __RSCalendarTypeID = __RSRuntimeRegisterClass(&__RSCalendarClass);
    __RSRuntimeSetClassTypeID(&__RSCalendarClass, __RSCalendarTypeID);
    //RSGregorianCalendar = RSSTR("");
}