Example #1
0
    System.Collections.IEnumerator PrintCpuFreq()
    {
        var data    = new int[8];
        var builder = new System.Text.StringBuilder();
        var wait    = new UnityEngine.WaitForSeconds(2f);

        while (true)
        {
            if (Android.CpuFreqency.CpuFrequency.Read(ref data, 8))
            {
                builder.Length = 0;
                builder.Append("CPU周波数の取得に成功しました\n\n");
                for (var i = 0; i < data.Length; i++)
                {
                    if (data[i] < 0)
                    {
                        continue;
                    }
                    builder.AppendFormat("{0}: {1}KHz\n", i, data[i]);
                }
                UnityEngine.Debug.Log(builder.ToString());
            }
            else
            {
                UnityEngine.Debug.Log("CPU周波数の取得に失敗しました");
            }

            yield return(wait);
        }
    }
Example #2
0
 public static void Register()
 {
     if (doNotModify)
     {
         return;
     }
     object o = null;
     {
         UnityEngine.WaitForSeconds v = (UnityEngine.WaitForSeconds)o;
         v = new UnityEngine.WaitForSeconds((System.Single)o);
         v.Equals((System.Object)o);
         v.GetHashCode();
         v.ToString();
     }
     {
         System.Threading.Thread v = (System.Threading.Thread)o;
         v = new System.Threading.Thread((System.Threading.ThreadStart)o);
         v = new System.Threading.Thread((System.Threading.ThreadStart)o, (System.Int32)o);
         v = new System.Threading.Thread((System.Threading.ParameterizedThreadStart)o);
         v = new System.Threading.Thread((System.Threading.ParameterizedThreadStart)o, (System.Int32)o);
         var p1 = v.CurrentUICulture;
         var p2 = v.CurrentCulture;
         var p3 = System.Threading.Thread.CurrentPrincipal;
         System.Threading.Thread.CurrentPrincipal = (System.Security.Principal.IPrincipal)o;
         var p4 = System.Threading.Thread.CurrentThread;
         var p5 = v.IsThreadPoolThread;
         var p6 = v.IsAlive;
         var p7 = v.IsBackground;
         v.IsBackground = (System.Boolean)o;
         var p8 = v.Name;
         v.Name = (System.String)o;
         var p9 = v.ThreadState;
         var pA = v.ManagedThreadId;
         v.Start();
         v.Start((System.Object)o);
         v.Join((System.TimeSpan)o);
         System.Threading.Thread.Sleep((System.TimeSpan)o);
         System.Threading.Thread.AllocateDataSlot();
         System.Threading.Thread.AllocateNamedDataSlot((System.String)o);
         System.Threading.Thread.GetNamedDataSlot((System.String)o);
         System.Threading.Thread.FreeNamedDataSlot((System.String)o);
         System.Threading.Thread.GetData((System.LocalDataStoreSlot)o);
         System.Threading.Thread.SetData((System.LocalDataStoreSlot)o, (System.Object)o);
         System.Threading.Thread.GetDomain();
         v.Abort();
         v.Abort((System.Object)o);
         System.Threading.Thread.SpinWait((System.Int32)o);
         System.Threading.Thread.BeginCriticalRegion();
         System.Threading.Thread.EndCriticalRegion();
         System.Threading.Thread.BeginThreadAffinity();
         System.Threading.Thread.EndThreadAffinity();
         v.GetApartmentState();
         v.SetApartmentState((System.Threading.ApartmentState)o);
         v.TrySetApartmentState((System.Threading.ApartmentState)o);
         v.GetHashCode();
         v.DisableComObjectEagerCleanup();
         v.Equals((System.Object)o);
         v.ToString();
     }
 }
Example #3
0
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single seconds = *(float *)&ptr_of_this_method->Value;

            var result_of_this_method = new UnityEngine.WaitForSeconds(seconds);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Example #4
0
        int __CreateInstanceUnityEngineWaitForSeconds(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;

            if (gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
            {
                float _seconds = (float)LuaAPI.lua_tonumber(L, 2);

                UnityEngine.WaitForSeconds gen_ret = new UnityEngine.WaitForSeconds(_seconds);
                translator.Push(L, gen_ret);

                return(1);
            }


            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.WaitForSeconds constructor!"));
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2))
                {
                    float _seconds = (float)LuaAPI.lua_tonumber(L, 2);

                    var gen_ret = new UnityEngine.WaitForSeconds(_seconds);
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.WaitForSeconds constructor!"));
        }
 public override IEnumerator Tick(UnityEngine.WaitForSeconds delayStart = null)
 {
     return(base.Tick(delayStart));
 }